我为一个API项目使用NancyFX和Highway.Data +实体框架。我的模块依赖于一个存储库,它依赖于一个DataContext。我需要的DataContext注册并包括web.config中的ConnectionString,所以我有这样的: public class CustomBootstrapper : DefaultNancyBootstrapper
{
protec
假设我有一个通用接口和一个通用实现。我如何注册所有用途? 具体而言,我有以下(减小为简单起见): public interface IRepository<T> where T : TableEntity
{
T GetById(string partitionKey, string rowKey);
void Insert(T entity);
void Upda