/// <summary> /// 构造方法 /// </summary> /// <param name="conCardContext"></param> public Repository(IconCardContext conCardContext) { this._dbContext = conCardContext as ConCardContext; this._dbSet = _dbContext.Set <T>(); this._connStr = _dbContext.Database.GetDbConnection().ConnectionString; }
public IRepository <T> CreateRepository <T>(IconCardContext conCardContext) where T : class { return(new Repository <T>(conCardContext)); }
public BaseService(IRepositoryFactory repositoryFactory, IconCardContext dbcontext) { this._repositoryFactory = repositoryFactory; this._dbcontext = dbcontext; }
public UserService(IRepositoryFactory repositoryFactory, IconCardContext dbcontext) : base(repositoryFactory, dbcontext) { }