public void Error(Logger_Error toAdd) { try { using (LMJEntities db = new LMJEntities()) { db.Logger_Error.Add(toAdd); db.SaveChanges(); } } catch (Exception ex) { throw; } }
public void Error(string Method, string Action, string Parameters, string Result) { try { Logger_Error toAdd = new Logger_Error(); toAdd.MethodName = Method; toAdd.ActionType = Action; toAdd.Parameters = Parameters; toAdd.Result = Result; toAdd.SysDate = DateTime.Now; _AllLoggerAccessor.Error(toAdd); } catch (Exception ex) { throw; } }