コード例 #1
0
        public void Delete(BankAccountChartViewModel model)
        {
            var entity = model.ToEntity();

            this._BankAccountChartRepository.Delete(entity);

            #region Commit Changes
            this._unitOfWork.Commit();
            #endregion
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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);
        }