Exemple #1
0
 public BaseService(IRepositoryFactory repositoryFactory, IXDbContext mydbcontext)
 {
     this._repositoryFactory = repositoryFactory;
     this._mydbcontext       = mydbcontext;
 }
Exemple #2
0
 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;
 }