Exemplo n.º 1
0
        public async Task <IActionResult> GetAll()
        {
            var buildings = await _buildingService.GetAllAsync();

            return(Ok(buildings));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetAllByGroupIdAsync(int id)
        {
            IEnumerable <BuildingDto> buildings = await _buildingService.GetAllAsync(building => building.GroupId == id);

            return(Json(buildings));
        }