public async Task <IActionResult> Create([Bind("PersonalID,FullName,FathersName,MothersName,DateOfBirth,Religion,Nationality,MaritalStatus,UserPicture")] PersonalDetail personalDetail) { if (ModelState.IsValid) { _context.Add(personalDetail); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(personalDetail)); }
public void Create(T entity) { _context.Add(entity); Save(); }