public static BaseAccountGroupModel ToBaseAccountGroup(this AccountGroup accountGroup)
        {
            BaseAccountGroupModel _result = new BaseAccountGroupModel();

            _result.Id = accountGroup.Id;
            _result.AccountGroupName  = accountGroup.AccountGroupName;
            _result.GroupUnder        = accountGroup.GroupUnder;
            _result.Narration         = accountGroup.Narration;
            _result.IsDefault         = accountGroup.IsDefault;
            _result.Nature            = accountGroup.Nature;
            _result.AffectGrossProfit = accountGroup.AffectGrossProfit;
            _result.CreatedDate       = accountGroup.CreatedDate;
            _result.ModifiedDate      = accountGroup.ModifiedDate;
            return(_result);
        }
        public static AccountGroup ToAccountGroup(this BaseAccountGroupModel accountGroup)
        {
            AccountGroup _result = new AccountGroup();

            if (accountGroup.Id.HasValue)
            {
                _result.Id = accountGroup.Id.GetValueOrDefault();
            }
            _result.AccountGroupName  = accountGroup.AccountGroupName;
            _result.GroupUnder        = accountGroup.GroupUnder;
            _result.Narration         = accountGroup.Narration;
            _result.IsDefault         = accountGroup.IsDefault;
            _result.Nature            = accountGroup.Nature;
            _result.AffectGrossProfit = accountGroup.AffectGrossProfit;
            _result.CreatedDate       = accountGroup.CreatedDate;
            _result.ModifiedDate      = accountGroup.ModifiedDate;
            return(_result);
        }