public async Task <Person> GetPeopleByName(string name) => (await Person.GetDataAsync().ConfigureAwait(false)).FirstOrDefault(x => x.Name == name) ?? throw HttpException.NotFound();
public async Task <Person> GetPeople(int id) => (await Person.GetDataAsync().ConfigureAwait(false)).FirstOrDefault(x => x.Id == id) ?? throw HttpException.NotFound();
public Person GetPerson(string skill, int age) => PeopleRepository.Database.FirstOrDefault(p => string.Equals(p.MainSkill, skill, StringComparison.CurrentCultureIgnoreCase) && p.Age == age) ?? throw HttpException.NotFound();
private static Person CheckPerson(int id) => PeopleRepository.Database.FirstOrDefault(p => p.Key == id) ?? throw HttpException.NotFound();
public Person GetPerson(DateTime date) => PeopleRepository.Database.FirstOrDefault(p => p.DoB == date) ?? throw HttpException.NotFound();