Saturday 15 January 2011

sql server - entity framework and native sql access -


I asked it on the EF forum and it was suggested to try it here ....

This question may be more relevant to Microsoft product development, but please also answer any questions.

I will be able to reach the SEL server and in future the Era5, POCO, I am using Code First, DBCtext API. I think I need to use native SQL to gain access to built-in database features, performance and control. So I use a lot of context.Database.SqlQuery and context.Database.ExecuteSqlCommand (with SqlParameters). I need precise control over my initial transactions and comm / rollback / set transactions.

Is the above mentioned SQL origin features deprecated and removed in future EF versions?

Am I better at using ADOnate and forget about using EF? Or maybe the ADO Net will eventually be deprecated in the favor of EF, so why should I stay with DBCNetext despite using mostly the original SQL access?

Thank you in advance

You can use it with EF or other huge ORM or by yourself. This allows you to slide the typed objects without any function directly to SQL and hard work and it internally uses ADOnate. Edonet is not going away.

Something like this:

  var dog = connection.Query & lt; Dog & gt; ("Choose from dogs * *");   

More documentation here:

Stackoverflow uses it for data access itself

No comments:

Post a Comment