public List <Sirket> ListAllSirketler() { try { using (SirketBusiness sirketBusiness = new SirketBusiness()) { return(sirketBusiness.ListAll()); } } catch (Exception) { throw; } }
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)); } }