Exemplo n.º 1
0
 public void Add(PersonalInfo personalInfo)
 {
     using (var pInfo = new PersoalInfoDbContext())
     {
         pInfo.PersonalInfos.Add(personalInfo);
         pInfo.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public void AddPInfo(IView view)
 {
     var pInfo = new PersonalInfo
                     {
                         Address = view.Address,
                         DateofBirth = view.DateofBirth,
                         IsAlive = view.IsAlive,
                         Name = view.Name,
                         PhoneNumbet = view.PhoneNumbet
                     };
     new Model().Add(pInfo);
 }