public async Task <ActionResult <IEnumerable <Demand> > > GetDemandsByName(string Name) { var demands = await _repository.getDemandsByName(Name); if (demands == null) { _logger.LogError($"Demands with name: {Name}, not found!"); return(NotFound()); } return(Ok(demands)); }