public long AddNewSecurityPersonel(SecurityPersonnelDetail securityPerson)
 {
     using (var context = new SecurityDepartmentEntities())
     {
         context.SecurityPersonnelDetails.Add(securityPerson);
         context.SaveChanges();
         return securityPerson.SecurityPersonnelID;
     }
 }
 public ActionResult Create(SecurityPersonnelViewModel securityViewModel)
 {
     try
     {
         var securityPersonnel = new SecurityPersonnelDetail
         {
             SecurityDepartmentID = securityViewModel.SecurityDepartmentID,
             SecurityPersonnelAddress = securityViewModel.SecurityPersonnelAddress,
             SecurityPersonnelAge = securityViewModel.SecurityPersonnelAge,
             SecurityPersonnelName = securityViewModel.SecurityPersonnelName
         };
        var id = _service.AddNewSecurityPersonel(securityPersonnel);
         return RedirectToAction("Details",id);
     }
     catch
     {
         return View();
     }
 }