/// <summary> /// Deletes the specified item that contains the id. /// </summary> /// <param name="id"></param> /// <param name="errors"></param> /// <param name="context"></param> /// <returns></returns> public bool TryDelete(int id, List <IModelError> errors, IModelContext context = null) { var exists = Exists(id, context); if (!exists) { AddNotExistsError(errors); return(false); } try { changeHandler.BeforeDelete(id, context); dal.Delete(id, context); changeHandler.AfterDelete(id, context); } catch (Exception ex) { log.Exception(LogName, ex); throw new InvalidOperationException("Unable to delete IAccountDataModel", ex); } return(true); }
public void Delete(Account account) { _accountDal.Delete(account); }
public int Delete(string id) { return(_accountDal.Delete(id)); }
public void Delete(int accountID) { _accountDal.Delete(accountID); }
public bool Delete(Account account) { return(_accountDal.Delete(account)); }
public IResult Delete(Account account) { _accountDal.Delete(account); return(new SuccessResult(Messages.AccountDeleted)); }
public bool Delete(Account entity) { return(_accountDal.Delete(entity)); }
public void Delete(Account entity) { _AccountDal.Delete(entity); }