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.Objects.ObjectContext.DeleteObject(对象实体,EntitySet 预期实体集)在 System.Data.Entity.DbSet`1.Remove(TEntity 实体)
我想逃避
Album_Share_Text album_Share_Text = new Album_Share_Text();
album_Share_Text.id_Album = memo.id_Album;...