Esempio n. 1
0
        public MtxDbContext CreateContext(DbTransaction transaction = null)
        {
            var context = new MtxDbContext(new DbContextOptionsBuilder <MtxDbContext>().UseSqlServer(this.Connection).Options);

            if (transaction != null)
            {
                context.Database.UseTransaction(transaction);
            }

            return(context);
        }
Esempio n. 2
0
 public Repository(MtxDbContext mtxDbContext)
 {
     this.mtxDbContext = mtxDbContext;
     this.table        = mtxDbContext.Set <T>();
 }