foreach (var memo in album.Album_Share_Text)
{
Album_Share_TextRepository album_Share_TextRepository = new Album_Share_TextRepository();
album_Share_TextRepository.Delete(memo);
album_Share_TextRepository.SaveChanges();
}
我无法删除它无法删除该对象,因为在ObjectStateManager中找不到该对象。在System.Data.Entity.DbSet`1.Remove(TEntity entity)的System.Data.Objects.ObjectContext.DeleteObject(Object entity,EntitySet expectedEntitySet)
我想逃避
Album_Share_Text album_Share_Text = new Album_Share_Text();
album_Share_Text.id_Album = memo.id_Album;...