Entity Framework 7 - Bulk Editing

preview_player
Показать описание
In Entity Framework, we used to have to load an object before we could modify or delete it. In EF 7 we can make changes directly in the database.

Please note the error described by @krccmsitp2884 in the pinned comment.

Topics include:
- New features in .NET 7 and C# 11
- Bulk updates
- Bulk deletes
- Observing generated SQL
- PATCH operations
- Object tracking
- Discards
- ExecuteUpdate/ExecuteUpdateAsync
- ExecuteDelete/ExecuteDeleteAsync
Рекомендации по теме
Комментарии
Автор

10:35 you should change the operator from > to == unless you wanted to delete all books from ID 1 and up.

krccmsitp
Автор

Mr. Kent, I have been a long-time subscriber, and I must say thank you for taking the time and effort to produce these excellent tutorials on YouTube. As an enthusiastic C# "hobbyist" and learner, there is no content provider I look forward to releasing their next video more than yourself. Your clear, concise and thorough explanations, no-nonsense and professional presentation style, and easily accessible source-code are all greatly appreciated. I simply cannot understand why you don't have 10x the subscriber count. Thank you again, and here is wishing you a very happy and prosperous New Year with many new releases on YouTube!

r
Автор

Which features of Entity Framework 7 have you been looking forward to most? Let me know.
And if you liked the video, click the 👍.

CodingTutorialsAreGo
Автор

May I ask why did you remove the .ToList() at 15:00 and still hit the database to get the books??

afshin
Автор

I think Delete is not correct any more:)

vencislavvidov