コード例 #1
0
        /// <summary>
        /// 单一添加房子和居民关系
        /// </summary>
        /// <param name="inhabitantAndHouseInfoAddMiddle"></param>
        /// <returns></returns>
        public int AddHouseInfoRelationShipSingle(InhabitantAndHouseInfoAddMiddle inhabitantAndHouseInfoAddMiddle)
        {
            var aAddInsertModel = _IMapper.Map <InhabitantAndHouseInfoAddMiddle, InfoRelationShip>(inhabitantAndHouseInfoAddMiddle);

            _houseInfoRelationShipRepository.Add(aAddInsertModel);
            return(_houseInfoRelationShipRepository.SaveChanges());
        }
コード例 #2
0
        /// <summary>
        /// 添加房子很居民的关系
        /// </summary>
        /// <param name="houseInfoRelationShipAddViewModel"></param>
        /// <returns></returns>
        public int AddHouseInfoRelationShip(HouseInfoRelationShipAddViewModel houseInfoRelationShipAddViewModel)
        {
            var tempAddViewMiddle = houseInfoRelationShipAddViewModel.houseInfoRelationShipAddMiddles;
            var aAddInsertModel   = _IMapper.Map <List <HouseInfoRelationShipAddMiddle>, List <InfoRelationShip> >(tempAddViewMiddle);

            _houseInfoRelationShipRepository.AddHouseInfoRelationShip(aAddInsertModel);
            return(_houseInfoRelationShipRepository.SaveChanges());
        }