public void Delete(SafeAccountChartViewModel model)
        {
            var entity = model.ToEntity();

            this._safeAccountChartsRepository.Delete(entity);

            #region Commit Changes
            this._unitOfWork.Commit();
            #endregion
        }
        public void ThrowExceptionIfExist(SafeAccountChartViewModel model)
        {
            //////ConditionFilter<SafeAccountChart, long> condition = new ConditionFilter<SafeAccountChart, long>
            //////{
            //////    Query = (entity =>
            //////        entity.BankId == model.BankId &&
            //////        entity.AccocunChartId == model.AccountChartId)
            //////};
            //////var existEntity = this._safeAccountChartsRepository.Get(condition).FirstOrDefault();

            //////if (existEntity != null)
            //////    throw new ItemAlreadyExistException();
        }
        public SafeAccountChartViewModel Update(SafeAccountChartViewModel model)
        {
            this.ThrowExceptionIfExist(model);

            var entity = model.ToEntity();

            entity = this._safeAccountChartsRepository.Update(entity);

            #region Commit Changes
            this._unitOfWork.Commit();
            #endregion

            model = entity.ToModel();
            return(model);
        }