public void DeattachTypes() { foreach (var _type in PhoneDB.ContactTypeTable) { PhoneDB.Entry(_type).State = EntityState.Detached; } }
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); }