public IHttpActionResult AdvertisementList()
 {
     try
     {
         var list = repo.FindAll();
         return(Ok <List <Advertisement> >(list));
     }
     catch (Exception)
     {
         return(InternalServerError());
     }
 }
Beispiel #2
0
        public IHttpActionResult Get()
        {
            try
            {
                AdvertisementRepository adRepo = new AdvertisementRepository();
                var Ads = adRepo.FindAll();

                return(Ok(Ads));
            }
            catch (Exception)
            {
                return(InternalServerError());
            }
        }