public async Task <IActionResult> SaveProduct([FromBody] ProductBindngTarget target) { Product p = target.ToProduct(); await context.Products.AddAsync(target.ToProduct()); await context.SaveChangesAsync(); return(Ok(p)); }
public string SaveProductJson(ProductBindngTarget product) { return($"JSON: {product.Name}"); }