예제 #1
0
 public List <Sirket> ListAllSirketler()
 {
     try
     {
         using (SirketBusiness sirketBusiness = new SirketBusiness())
         {
             return(sirketBusiness.ListAll());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #2
0
        public IHttpActionResult Get()
        {
            using (var sirketBusiness = new SirketBusiness())
            {
                // Get customers from business layer (Core App)
                List <Sirket> sirketler = sirketBusiness.ListAll();

                // Prepare a content
                var content = new ResponseContent <Sirket>(sirketler);

                // Return content as a json and proper http response
                return(new StandartResult <Sirket>(content, Request));
            }
        }