public async Task <IActionResult> Create([Bind("Id,Name,Company,Article,Price,Image,ImageType")] Watch watch) { if (ModelState.IsValid) { _context.Add(watch); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(watch)); }
public void AddCustomer(Library.Customer customer) { Customer Entity = Map.MapCustomerWithEF(customer); MyDBContext.Add(Entity); }