// GET api/credit // Retrieve public IHttpActionResult Get() { apiResp = new ApiResponse(); var mng = new CreditManager(); apiResp.Data = mng.RetrieveAll(); return(Ok(apiResp)); }
// Retrieve all public IHttpActionResult Get() { var mng = new CreditManager(); List <Credit> creditList = mng.RetrieveAll(); if (creditList == null) { return(Content(HttpStatusCode.NotFound, "Not found")); } return(Ok(creditList)); }