Beispiel #1
0
        public IHttpActionResult Get()
        {
            using (var calisanlarBusiness = new CalisanlarBusiness())
            {
                // Get customers from business layer (Core App)
                List <Calisanlar> calisanlar = calisanlarBusiness.ListAll();

                // Prepare a content
                var content = new ResponseContent <Calisanlar>(calisanlar);

                // Return content as a json and proper http response
                return(new StandartResult <Calisanlar>(content, Request));
            }
        }
Beispiel #2
0
 public List <Calisanlar> ListAllCalisanlar()
 {
     try
     {
         using (CalisanlarBusiness calisanlarBusiness = new CalisanlarBusiness())
         {
             return(calisanlarBusiness.ListAll());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }