public ActionResult <IEnumerable <Contact> > Get() { try { return(Ok(_cs.Get())); } catch (Exception e) { return(BadRequest(e.Message)); }; }
public ActionResult <List <UserInfoModel> > Contacts() { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var Contacts = ContactService.Get(); return(View(Contacts)); }
public ActionResult <List <Contact> > Get() => _contactsService.Get();
public ActionResult <List <Contact> > Get() { return(_contactsService.Get()); }