public DataAccess(HttpContextBase c) { httpCtx = c; httpCtx.Trace.TraceMode = TraceMode.SortByTime; httpCtx.Trace.IsEnabled = true; httpCtx.Trace.TraceFinished += (x, y) => { var message = ""; foreach (TraceContextRecord trace in y.TraceRecords) { message += "/r/n/r/n Categry: " + trace.Category + "/r/n"; message += trace.Message; } lock (_db_log_lock) { File.AppendAllText(HostingEnvironment.ApplicationPhysicalPath + "/App_Data/db_log.txt", message); } }; db = new Data.SqlDbContext(); }
public DamageController() { dbContext = new Data.SqlDbContext(); }
public LossController() { dbContext = new Data.SqlDbContext(); }