c# - Is there a benefit to override the default Insert/Update/Delete queries for EF -


as question asks really.

the ef modeller tool allows map insert/update/delete functions sproc, there benefit overriding them?

if requires custom validation, yes, if i'm happy how now, worth creating sproc's them all?

i can't remember how view sql it's executing them find out exact query, should imagine it'd pretty similar standard insert/update/delete query.

i can think of few cases useful:

  • you're working legacy database doesn't quite map ef model precisely.
  • you need queries executed on insert/update/delete, don't have rights triggers on database.
  • soft deletes in database want abstract away from. regular delete perform soft delete.

not quite sure how viable these options are, more of nhibernate guy. these theoretical options.

as viewing executed queries, there's few possibilities that. attach profiler sql server instance , @ raw queries executed. there's entity framework profiler (by ayende/oren eini) isn't free, make reading , debugging queries lot easier.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -