public static DbContext CreateDbContext() { DbContext dbContext = (DbContext)CallContext.GetData("dbContext"); if (dbContext == null) { dbContext = new CTEntities(); CallContext.SetData("dbContext", dbContext); } return(dbContext); }
public static DbContext CreateDbContext() { DbContext dbContext = (DbContext)CallContext.GetData("dbContext"); if (dbContext == null) { dbContext = new CTEntities(); CallContext.SetData("dbContext", dbContext); } return(dbContext); }