public ActionResult <IEnumerable <Contact> > Get()
 {
     try
     {
         return(Ok(_cs.Get()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     };
 }
Exemple #2
0
        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();
Exemple #4
0
 public ActionResult <List <Contact> > Get()
 {
     return(_contactsService.Get());
 }