.NET Data Community Standup - Intercept this EF7 Preview 6 Event

preview_player
Показать описание
EF7 includes a variety of new interceptors and events, as well as many improvements to the existing lifecycle hooks. In this session, Arthur and others from the .NET Data team will dive into this new functionality, including examples for intercepting materialization of entities, query expression trees, identity resolution when tracking, and optimistic concurrency violations. Join us for a fun-packed ride into the world of modifying EF behavior through interception with code galore!





#efcore #entityframework #ef7
Рекомендации по теме
Комментарии
Автор

Very cool, the materialization interception opens a lot of doors to integrate with everything.

eglauko
Автор

Wow, this is awesome 👏🏼. I have a use case for setting calculated values for objects that inherit from an interface. I was doing it by overwriting SaveChanges before but it’ll be nice to do it ahead of time to check for issues. Awesome job!

andrewbeeman
Автор

Why would one ever load a full record just to delete it? Why not have a DeleteById() method that would actually perform a DELETE sql statement? if there is a concurrency issue and two people try to delete the record, no big deal because the second request deletes nothing— no harm, no foul. We could log that we have detected a “no Rows deleted” Scenario and forget the interceptor all together.

DuelingTreeMike
Автор

IHasKey. (Interface) LOL thank you. I’m totally using/stealing that for linguistic comedy in code. Should be a lot of fun with foreign developers in meetings

Reminds me of a project where we are creating a commissary application where the recipes for food or comprised of a model of different items in the recipe. Lots of tables and lots of foreign keys and one was names FK_EAT_SALT. 😆

IHasKey for the win!

DuelingTreeMike