public bool AddError(Error newError, bool bSave) { Debug.WriteLine(GetType().FullName + "." + MethodBase.GetCurrentMethod().Name); //want to force this to hit the db if the model is invalid newError = (Error) newError.ForceValidData(); _context.Errors.Add(newError); return !bSave || Save(); }
public bool UpdateError(Error item, bool bSave) { Debug.WriteLine(GetType().FullName + "." + MethodBase.GetCurrentMethod().Name); //want to force this to hit the db if the model is invalid item = (Error)item.ForceValidData(); DeleteError(item.Id, false); _context.Errors.Add(item); return !bSave || Save(); }