public IActionResult cotizacionId(int id) { servsbs = new servicesSbs(); var response = servsbs.getCotizacionId(id); var json = response.Content.ReadAsStringAsync(); if (!response.IsSuccessStatusCode) { Console.WriteLine("Se presento un Error"); return(BadRequest(json.Result)); } else { Console.WriteLine("Success"); return(Ok(json.Result)); } }
public IActionResult createProduct(productos product) { servsbs = new servicesSbs(); var response = servsbs.createProduct(product); var json = response.Content.ReadAsStringAsync(); if (!response.IsSuccessStatusCode) { Console.WriteLine("Se presento un Error"); return(BadRequest(json.Result)); } else { Console.WriteLine("Success"); return(Ok(json.Result)); } }