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));
        }
Exemple #2
0
 public void Create(T entity)
 {
     _context.Add(entity);
     Save();
 }