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); }
public async Task <IActionResult> SaveBuildingType([FromBody] BuildingTypeDataDto buildingType) { await _buildingService.SaveBuildingType(buildingType); return(Ok()); }