public void Delete(BankAccountChartViewModel model) { var entity = model.ToEntity(); this._BankAccountChartRepository.Delete(entity); #region Commit Changes this._unitOfWork.Commit(); #endregion }
public void ThrowExceptionIfExist(BankAccountChartViewModel model) { //////ConditionFilter<BankAccountChart, long> condition = new ConditionFilter<BankAccountChart, long> //////{ ////// Query = (entity => ////// entity.BankId == model.BankId && ////// entity.AccocunChartId == model.AccountChartId) //////}; //////var existEntity = this._BankAccountChartRepository.Get(condition).FirstOrDefault(); //////if (existEntity != null) ////// throw new ItemAlreadyExistException(); }
public BankAccountChartViewModel Update(BankAccountChartViewModel model) { this.ThrowExceptionIfExist(model); var entity = model.ToEntity(); entity = this._BankAccountChartRepository.Update(entity); #region Commit Changes this._unitOfWork.Commit(); #endregion model = entity.ToModel(); return(model); }