//[ValidateAntiForgeryToken] public JsonResult CreateSale([FromBody] ProductSold productSold) { if (ModelState.IsValid) { _context.Add(productSold); _context.SaveChanges(); } return(Json(productSold)); }
//[ValidateAntiForgeryToken] public JsonResult CreateStore([FromBody] Store store) { if (ModelState.IsValid) { _context.Add(store); _context.SaveChanges(); } return(Json(store)); }
// [ValidateAntiForgeryToken] public JsonResult CreateCustomer([FromBody] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); _context.SaveChanges(); } return(Json(customer)); }