Пример #1
0
        public async Task <IActionResult> SearchPersonAsync([FromQuery] string searchText = "")
        {
            var persons = await _personLogic.SearchPersonAsync(searchText);

            var info = new QueryResult <List <Person> > {
                Data = persons, ErrorCode = persons.Any() ? ErrorCode.Ok : ErrorCode.NotFound
            };

            return(Ok(info));
        }