public IHttpActionResult Get(int id) { ClienteProductos m = new ClienteProductos(); IEnumerable <ProductosDTO> aux = m.GetAllByClient(""); return(Ok()); }
public IHttpActionResult GetProductos([FromBody] LoginViewModel model) { if (model.Email.Length > 0) { ClienteProductos m = new ClienteProductos(); IEnumerable <ProductosDTO> aux = m.GetAllByClient(model.Email); return(Ok(aux)); } return(BadRequest("Entrada Invalida")); }
public IHttpActionResult Post([FromBody] ClienteProductosDTO value) { if (value.Id == 0 && ModelState.IsValid) { ClienteProductos m = new ClienteProductos(); ResponseInfo response = m.Save(value); if (response.Success) { return(Ok(value)); } return(BadRequest(response.Message)); } return(BadRequest("Entrada Invalida")); }
public IHttpActionResult Delete(string email, string codProd) { if (email.Length > 0) { ClienteProductos m = new ClienteProductos(); ResponseInfo response = m.Delete(email, codProd); if (response.Success) { return(Ok()); } else { return(BadRequest(response.Message)); } } return(BadRequest("Entrada Invalida")); }