public IHttpActionResult Get() { using (var musterilerBusiness = new MusterilerBusiness()) { // Get customers from business layer (Core App) List <Musteriler> musteriler = musterilerBusiness.ListAll(); // Prepare a content var content = new ResponseContent <Musteriler>(musteriler); // Return content as a json and proper http response return(new StandartResult <Musteriler>(content, Request)); } }
public List <Musteriler> ListAllMusteriler() { try { using (MusterilerBusiness musterilerBusiness = new MusterilerBusiness()) { return(musterilerBusiness.ListAll()); } } catch (Exception) { throw; } }