// DELETE: api/Carrito/5 public void Delete(int id) { List <Carrito> listaUser = new Carrito().cargar_carrito(ref mensaje_error, ref numero_error); Carrito x = listaUser.ElementAt(id); Carrito delete = new Carrito(); delete.deleteCartItem(ref mensaje_error, ref numero_error, Convert.ToInt32(x.Cod_Item)); }
// GET: api/Carrito/5 public Carrito Get(int id) { List <Carrito> item_carlist = new Carrito().cargar_carrito(ref mensaje_error, ref numero_error); crypting c = new crypting(); Carrito x = item_carlist.ElementAt(id); Carrito spes = new Carrito(); spes.Cod_Item = x.Cod_Item; spes.Codigo_Vuelo = x.Codigo_Vuelo; spes.Pais = c.decrypt(x.Pais); spes.Precio = c.decrypt(x.Precio); return(spes); }