Example #1
0
        public void Save(ContactWeb.Models.Contact contact, List<BUS.Friend> friends)
        {
            var toDelete = DB.Friends.Where(f => f.ContactId1 == contact.Id || f.ContactId2 == contact.Id);
            DB.Friends.DeleteAllOnSubmit(toDelete);
            foreach(var friend in friends)
            {
                DB.Friends.InsertOnSubmit(new Friend{ContactId1 = friend.ContactID1, ContactId2 = friend.ContactId2});
            }

            DB.SubmitChanges();
        }
Example #2
0
 public void Save(ContactWeb.Models.Contact contact, List<BUS.Friend> friends)
 {
     throw new NotImplementedException();
 }