public void LogInfo(string message) { var entity = new ErrorLogg(); entity.DateOf = DateTime.Now; entity.LogLevel = "Info"; entity.Message = message; entity.Stack = ""; _Context.Set <ErrorLogg>().Add(entity); _Context.SaveChanges(); }
public void LogError(Exception ex, string message) { var entity = new ErrorLogg(); entity.DateOf = DateTime.Now; entity.LogLevel = "Error"; entity.Message = message; entity.Stack = ex.ToString(); _Context.Set <ErrorLogg>().Add(entity); _Context.SaveChanges(); }