public async Task <IActionResult> Create([Bind("Id,PersonId,CityId")] Citizenship citizenship) { if (ModelState.IsValid) { _context.Add(citizenship); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(citizenship)); }
public async Task <IActionResult> Create([Bind("Id,Smile,Beauty,Nature,Character,Communication,Humor,OfPersonId,ByPersonId")] Quality quality) { if (ModelState.IsValid) { _context.Add(quality); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(quality)); }
public async Task <IActionResult> Create([Bind("Id,FirstPersonId,SecondPersonId")] FriendEntry friendEntry) { if (ModelState.IsValid) { _context.Add(friendEntry); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(friendEntry)); }
public async Task <IActionResult> Create([Bind("Id,Name,Surname,Gender,DateTimeOfBirth")] Person person) { if (ModelState.IsValid) { _context.Add(person); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(person)); }