public async Task <IActionResult> Create([Bind("guid,name,password,salt,createdOn,id")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customer)); }
public async Task <bool> SaveChange() { return(await _context.SaveChangesAsync() > 0); }