예제 #1
0
 // GET: api/Home/5
 public HttpResponseMessage GetUserDetails(string id)
 {
     try
     {
         var bll = new Idbll();
         var userDetail = bll.GetIdUserDetailByIdNumber(id);
         return Request.CreateResponse(HttpStatusCode.OK, userDetail);
     }
     catch (Exception exception)
     {
         return Request.CreateResponse(HttpStatusCode.InternalServerError, exception.Message);
     }
 }
예제 #2
0
 // GET: api/Home
 public HttpResponseMessage Get()
 {
     try
     {
         var bll = new Idbll();
         var id = bll.GetValidGeneratedId();
         return Request.CreateResponse(HttpStatusCode.OK, id);
     }
     catch (Exception exception)
     {
         return Request.CreateResponse(HttpStatusCode.InternalServerError, exception.Message);
     }
 }