Exemplo n.º 1
0
 // GET: api/Publication
 // GET: api/Publication?idBuyer=6
 // GET: api/Publication?status=0    //Publication.STATE.OPEN
 // GET: api/Publication?status=1    //Publication.STATE.CLOSE_BY_ACEPTED_OFFER
 // GET: api/Publication?status=2    //Publication.STATE.CLOSE_BY_USER
 public IHttpActionResult Get(int status = 0, int idBuyer = 0)
 {
     if (idBuyer > 0)
     {
         return(Ok(publicationService.GetOfBuyer(idBuyer, status)));
     }
     else
     {
         return(Ok(publicationService.GetAll(status)));
     }
 }