public async Task <IActionResult> Create([Bind("Id,AddressTitle,Address,City,Region,PostalCode,Country,Phone,Fax")] AddressType addressType) { if (ModelState.IsValid) { _context.Add(addressType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(addressType)); }
public async Task <IActionResult> Create([Bind("ContactID,Title,FirstName,MiddleName,LastName,HomePhone,MobilePhone")] PersonContact personContact) { if (ModelState.IsValid) { _context.Add(personContact); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(personContact)); }