What are the considerations for the use of ADO.NET calls
This article will explain in detail what matters needing attention in the use of ADO.NET calls. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
If you call ADO.NET, you can try the example in this article, and then use it according to your own understanding.
'Using EntityCommand Interface Private Sub QueryESql1 () Using eConn As New EntityConnection (ConnString) Dim myQuery = "Using cmd As New EntityCommand (myQuery, eConn) eConn.Open () Using reader = cmd.ExecuteReader (CommandBehavior.SequentialAccess) While (reader.Read ()) Console.WriteLine (reader.GetValue (0)) End While End Using End Sub
III. How to use eSQL
EF provides two sets of interfaces for eSQL: Entity Command interface and ObjectQuery interface. Let's first take a look at the usage patterns of these two sets of interfaces:
Entity Command interface:
First, create a connection ADO.NET call of type EntityConnection with a preconfigured connection string
Then, define the query statement
Create an object cmd of EntityCommand through join and query statements
Step 4, open the connection and read the data.
This interface form is closer to the traditional ADO.NET call form.
This is the end of this article on "what are the precautions for the use of ADO.NET calls". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.