public void AddPersonaSocialAccount(SocialAccountDetailDTO item)
 {
     p1p.Data.SocialAccount newSocialAccount;
     p1p.Data.SocialAccount mdlSocialAccount = (p1p.Data.SocialAccount)P1PObjectMapper.Convert(item, typeof(p1p.Data.SocialAccount));
     mdlSocialAccount.InsertDate = DateTime.Now;
     using (P1PContext ctx = new P1PContext())
     {
         newSocialAccount = ctx.SocialAccounts.Add(mdlSocialAccount);
         ctx.PersonaSocialAccountXREFs.Add(new PersonaSocialAccountXREF()
         {
             PersonaId       = item.PersonaId,
             SocialAccountId = newSocialAccount.Id,
             InsertDate      = DateTime.Now
         });
         ctx.SaveChanges();
     }
 }
示例#2
0
 public void AddPersonaSocialAccount(SocialAccountDetailDTO item)
 {
     repo.AddPersonaSocialAccount(item);
 }