示例#1
0
 public HttpResponseMessage GetAll()
 {
     try
     {
         return(Request.CreateResponse(HttpStatusCode.OK, _business.GetAll()));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
示例#2
0
 public ActionResult Index()
 {
     return(View(_business.GetAll()));
 }