コード例 #1
0
 /// <summary>
 /// log lại lỗi vào trong Db
 /// </summary>
 /// <param name="ex">thôgn tin lỗi</param>
 private void LogError(Exception ex)
 {
     try
     {
         Error error = new Error();
         error.CreatedDate = DateTime.Now;
         error.Message     = ex.Message;
         error.Stacktrace  = ex.StackTrace;
         _errorService.Creat(error);
         _errorService.Save();
     }
     catch (Exception)
     {
         throw;
     }
 }