public async Task <IActionResult> CreatProductImage(CreatProductImage request) { var creat = await _productImageConnectAPI.CreatProductImage(request); return(Json(new { status = true })); }
public async Task <bool> CreatProductImage(CreatProductImage request) { var json = JsonConvert.SerializeObject(request); var jsonstring = new StringContent(json, Encoding.UTF8, "application/json"); var creat = _httpClientFactory.CreateClient(); creat.BaseAddress = new Uri("https://localhost:44318"); var post = await creat.PostAsync("api/ProductImage/CreatProductImage", jsonstring); return(post.IsSuccessStatusCode); }
public async Task <IActionResult> CreatProductImage([FromBody] CreatProductImage request) { var creat = await _productImageSerVice.CreatProductImage(request.ProductId, request.Images); return(Ok()); }