public bool SaveError(ErrItemPoco eo) { try { var dbItem = ConvertPocoToDb(eo); var repo = new ErrorItemsRepo(new WutNuContext()); if (eo.Id > 0) { repo.UpdateErrorItem(dbItem); } else { repo.InsertErrorItem(dbItem); } return(true); } catch (Exception ex) { Logging.WriteToAppLog("Error saving SiteError object to DB: " + ex.Message, EventLogEntryType.Error); return(false); } }
public bool SaveError(ErrItemPoco eo) { return(_mgr.SaveError(eo)); }
private ErrorLog ConvertPocoToDb(ErrItemPoco item) { return(JsonConvert.DeserializeObject <ErrorLog>(JsonConvert.SerializeObject(item))); }