public UnitOfWork(ReyukoContext context) { _context = context; string timeOut = ConfigurationManager.AppSettings.Get("CommandTimeOut"); if (!string.IsNullOrEmpty(timeOut)) { _context.Database.CommandTimeout = int.Parse(timeOut); } }
public DBTransaction(ReyukoContext context, System.Data.IsolationLevel isolationLevel = System.Data.IsolationLevel.Snapshot) { string contextName = AppConfig.Current.ContextName; if (contextName.ToLower() == "localcontext") { _transaction = context.Database.BeginTransaction(); } else { _transaction = context.Database.BeginTransaction(isolationLevel); } }