public IActionResult Get() { IEnumerable <Contractor> result; try { result = db.GetAll(); } catch (Exception) { return(BadRequest("Ошибка базы данных")); } return(Ok(result)); }
internal Task <List <Contact> > GetAll() { return(datasource.GetAll()); }