Exemplo n.º 1
0
        // GET: Annonce/Delete/5
        public ActionResult Delete(int id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Annonce a = AnnonceService.GetById(id);

            if (a == null)
            {
                return(HttpNotFound());
            }

            return(View(a));
        }
        // GET :api/AnnonceApiWeb/5
        public Annonce Get(int id)
        {
            Annonce comp = MyService.GetById(id);

            return comp;
        }