Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
 public DamageController()
 {
     dbContext = new Data.SqlDbContext();
 }
Exemplo n.º 4
0
 public LossController()
 {
     dbContext = new Data.SqlDbContext();
 }