public ActionResult About(int id) { List <Brachi.Bussines.BusPractica.Carro> lst = new BusCars().GetCarros(); Brachi.Bussines.BusPractica.Carro car = lst.FirstOrDefault(l => l.id_car == id); return(View(car)); }
public HttpResponseMessage PostCarro(Carro carro) { Carro car1 = new BusCars().CreateCarro(carro); if (car1 != null) { return(Request.CreateResponse(HttpStatusCode.Created, car1)); } return(Request.CreateResponse(HttpStatusCode.OK, false)); }
public HttpResponseMessage PutCarro(int idp, Carro carro) { int car1 = new BusCars().UpdateCarro(carro); if (car1 > 0) { return(Request.CreateResponse(HttpStatusCode.Accepted, true)); } return(Request.CreateResponse(HttpStatusCode.NotModified, false)); }