예제 #1
0
        // GET api/credit
        // Retrieve
        public IHttpActionResult Get()
        {
            apiResp = new ApiResponse();
            var mng = new CreditManager();

            apiResp.Data = mng.RetrieveAll();

            return(Ok(apiResp));
        }
예제 #2
0
        // 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));
        }