예제 #1
0
 public T GetById(int id)
 {
     try
     {
         var obj = Session.Get <T>(id);
         return(obj);
     }
     catch (Exception ex)
     {
         Logger.ErrorExceptionsWithInner("GetById Method", ex);
         return(null);
     }
 }
예제 #2
0
        public void Application_Error(object sender, EventArgs e)
        {
            var ctx = HttpContext.Current;

            var exception = ctx.Server.GetLastError();

            Logger.ErrorExceptionsWithInner("Unhandled Application Error", exception);
            Logger.Error(string.Format("Request Url : {0}", ctx.Request.Url));
        }