Ejemplo n.º 1
0
        public async Task <IActionResult> GetAllAsync(Filter filter)
        {
            if (ModelState.IsValid)
            {
                if (filter.IsEmpty())
                {
                    return(Ok(await _monitor.GetAllBuildingsAsync(b => b.WaterMeter)));
                }
                return(await FilterBuildingsAsync(filter));
            }

            return(BadRequest(ModelState));
        }