// POST: api/Inventario public IHttpActionResult Post([FromBody] InventarioViewModel model) { // Validation logic errors BL.ValidacionUnique(model); if (BL.jresult.hasError()) { return(Json(BL.jresult)); } // Normal fluent var jresult = BL.InsInventario(model); if (jresult.Success) { return(Ok(jresult)); } else { // Internal errors return(Json(jresult)); } }