예제 #1
0
        public async Task <BuildingCategory> SaveBuildingType(BuildingTypeDataDto buildingType)
        {
            var bldgType = await _buildingCategoryRepo.GetFirstOrDefault(b => b.Id == buildingType.Id);

            if (bldgType != null)
            {
                bldgType.Type    = buildingType.Type;
                bldgType.InSurge = buildingType.InSurge;
            }

            await _buildingCategoryRepo.SaveAsync();

            return(bldgType);
        }
예제 #2
0
        public async Task <IActionResult> SaveBuildingType([FromBody] BuildingTypeDataDto buildingType)
        {
            await _buildingService.SaveBuildingType(buildingType);

            return(Ok());
        }