示例#1
0
 public void DeattachTypes()
 {
     foreach (var _type in PhoneDB.ContactTypeTable)
     {
         PhoneDB.Entry(_type).State = EntityState.Detached;
     }
 }
示例#2
0
        public byte[] GetImageById(int id)
        {
            var FindedContact = PhoneDB.ContactTable.Where(C => C.Id == id).ToList().First();

            byte[] findimage = FindedContact.Image;
            PhoneDB.Entry(FindedContact).State = EntityState.Detached;
            return(findimage);
        }