public static void WriteDebugLog(string log) { ILoggingRepository logRepository = new LoggingRepository(); logRepository.Add(new Logging() { CreatedDate = DateTime.Now, Message = log, Type = Convert.ToString((int)LogType.Debug) }); logRepository.Save(); }
public static void WriteExceptionLog(Exception ex) { ILoggingRepository logRepository = new LoggingRepository(); logRepository.Add(new Logging() { CreatedDate = DateTime.Now, ExceptionMessage = ex.Message, InnerExceptionMessage = ex.InnerException.Message, LineNumber = GetLineNumber(ex), MethodName = GetMethodName(ex), Type = Convert.ToString((int)LogType.Debug) }); logRepository.Save(); }