コード例 #1
0
 public IHttpActionResult GetByUser(int id)
 {
     try
     {
         List <Empresa> result = EmpresaBLL.ListByUser(id);
         if (result == null)
         {
             return(NotFound());
         }
         return(Content(HttpStatusCode.OK, result));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.BadRequest, ex));
     }
 }