比较C#中的方法以连接到SQL Server数据库 [英] Compare methods in C# to connect to SQL Server database

查看:133
本文介绍了比较C#中的方法以连接到SQL Server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请比较C#中的方法以连接到SQL Server数据库。例如,传统和实体框架的3层架构(linq到实体或linq到sql对象模型)和Linq到SQL。在速度,质量和功能方面哪个更好。

Please compare methods in C# to connect to SQL Server database. For example, 3-tier architecture of traditional and entity Framework (linq to entity or linq to sql object model) and Linq to SQL. In terms of speed, quality and functionality which one is better.

推荐答案

C#中有多个方法,它们依赖于您自己的架构和设计平台。如果平台是Windows(.NET Framework)并且数据的服务器是SQL Server,则应使用.NET框架的 SqlClient 来处理数据。



如何将SQL数据库连接到您的C#程序,初学者的教程 [ ^ ]阅读文章,了解.NET为您提供的连接,以及如何连接到SQL Server数据库。



速度,质量和功能总是优于内置模块,但是,您始终可以创建自己的框架和项目来处理项目中的数据库。但是,使用内置函数会更好,更有效。
There are more than one methods in C#, and they depend on your own architecture and design on the platform. If the platform is Windows (.NET Framework) and the server for the data is the SQL Server, you should use the SqlClient of the .NET framework to work with data.

How to connect SQL Database to your C# program, beginner's tutorial[^] Read the article and understand what .NET has for you, how you connect to the SQL Server databases.

Speed, Quality and functionality would be better of built-in modules always, however, you can always create your own frameworks and projects to work with databases in your project. But, using the built-in functions will be better and more efficient.


那你会做什么?我们在这里回答具体问题。请理解。



你问的问题是一个很大的话题,需要适当的时间和资源来比较。它无法快速回答。



我强烈建议你继续自己动手。如果您在进行研究时遇到任何特定问题,请再次回答代码项目中的问题。
Then what you will do? We answer specific questions here. Please understand.

The question you are asking is a vast topic and needs proper time and resource to compare. It cannot be quickly answered.

I would highly recommend you to go on and do this yourself. If you face any specific issue while your research is going on, come back and ask a question in Code Project again.


这篇关于比较C#中的方法以连接到SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆