what is the best way to connect to database in c#? -
I am making a beginning in C # and I am the best way to connect and work with the CLL server in C # Looking for #. I found that there are three ways to work with the database:
- ado Net
- Lincoln
- Entity Framework
But the more useful and applicable to me, I became confused as of this. Please help me Thanks
I'm looking at the best way to connect and work with SQL Server #
The 'best method' can be treated differently depending on your project requirements. There is no best way for all matters, sometimes you need ease of development, some times you need to perform best, some time you need to compromise (I choose then) . In addition it depends on the complexity of your application - whether you have a rich domain model, or you display the table data on the UI.
1.AdO Net
is the fastest way, but manual encoding is very much needed to manually set up database connections, open them and close them, create commands, provide commands for command and command To perform. Mapping of query results should also be done manually
2.Linq
This is not the way to connect to the database Linq language is an integrated question, which has many implementations - Linq to XML, Linq to DataSet, Linq for the object, Linq to SQL, Linq to Entities etc.
3.Entity Framework
The unit framework uses units in Linq and it is built on ADO.NET (internal Linq query to ADO. NET code). It is easy to use, because EF handles the connection, generates commands and executes, and removes the query query to the organizations for you. But you should pay for it with performance.
Comments
Post a Comment