Exemplo n.º 1
0
        public JsonResult GetAll()
        {
            List <PublicationViewModel> publicationViews = _publicationService.GetAll().ToList();
            JsonResult result = Json(publicationViews, JsonRequestBehavior.AllowGet);

            result.MaxJsonLength = int.MaxValue;

            return(result);
        }
Exemplo n.º 2
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)));
     }
 }
 public GetPublicationViewModel Get()
 {
     return(_publicationService.GetAll());
 }
        public GetAllPublicationView Get()
        {
            GetAllPublicationView allPublicationViewModel = _allPublication.GetAll();

            return(allPublicationViewModel);
        }