public async Task <JsonResult> AddNew_Product([FromBody] Product obj) { var result = await _product_repo.Add_New(obj); if (result > 0) { foreach (var img in obj.ImageList) { img.Reference_Id = result; } await _img_repo.Add_New_ImagesAsync(obj.ImageList); } return(Json(result)); }