public IActionResult GetPeopleWhoHaveBirthDayToday() { var response = new GetBirthDayPeopleDetailsResponse(); try { response = getBirthdayPeopleDetailsResponseProvider.GetBirthdaysForToday(); } catch (Exception exception) { return(NotFound()); } if (response.BirthdayPeopleList?.Any() ?? false) { return(NotFound(response)); } return(Ok(response)); }
public IActionResult GetBirthDayPersonInfoByLastName(string lastName) { var response = new GetBirthDayPeopleDetailsResponse(); try { response = getBirthdayPeopleDetailsResponseProvider.GetBirthdaysFilteringByLastName(lastName); } catch (InvalidOperationException exception) { return(StatusCode(500)); } catch (Exception exception) { return(NotFound(response)); } if (response.BirthdayPeopleList?.Any() ?? false) { return(NotFound(response)); } return(Ok(response)); }