public BaseService(IRepositoryFactory repositoryFactory, IXDbContext mydbcontext) { this._repositoryFactory = repositoryFactory; this._mydbcontext = mydbcontext; }
public IRepository <T> CreateRepository <T>(IXDbContext mydbcontext) where T : class { return(new Repository <T>(mydbcontext)); }
public Repository(IXDbContext mydbcontext) { this._dbContext = mydbcontext as XDbContext; this._dbSet = _dbContext.Set <T>(); this._connStr = _dbContext.Database.GetDbConnection().ConnectionString; }