/// <summary> /// Delete an entity. /// </summary> /// <param name="model"></param> public void Delete(AccountChartCategoryViewModel model) { var entity = model.ToEntity(); this._AccountChartCategorysRepository.Delete(entity); #region Commit Changes this._unitOfWork.Commit(); #endregion }
/// <summary> /// Update an entity. /// </summary> /// <param name="model"></param> /// <returns></returns> public AccountChartCategoryViewModel Update(AccountChartCategoryViewModel model) { this.ThrowExceptionIfExist(model); var entity = model.ToEntity(); entity = this._AccountChartCategorysRepository.Update(entity); #region Commit Changes this._unitOfWork.Commit(); #endregion model = entity.ToModel(); return(model); }