我是 .net 框架的新手。
我即将启动一个项目,其中我只有对客户数据库的读取访问权限。该数据库没有我需要查询项目所需信息的所有存储过程。所以我需要在我的应用程序中的某个地方编写额外的查询。
作为 .net 的新手,有人可以推荐一些“快速入门”指南,告诉我在开始创建自己的数据访问层之前需要了解哪些库/包吗?
其他信息
另一位 .net 开发人员告诉我,我将无法有效地使用实体框架,因为创建数据库的人没有显式声明外键和数据库完整性约束。如果您可以确认此限制,那么这意味着我必须使用 ado.net 库编写自己的查询?
I'm new to the .net framework.
I'm about to start a project where I only have read access to the client's database. The database doesn't have all the stored procedures that I need to query for the information my project needs. So I need to write additional queries somewhere in my application.
Being new to .net and all, can someone recommend some "quick start" guides on what libraries/packages I need to be aware of before i start creating my own data access layer?
Additional info
Another .net developer told me I won't be able to use the Entity framework effectively because the person who made the database didn't explicitly declare foreign keys and db integrity constraints. If you guycan confirm this limitation, then it means I'll have to write my own queries with the ado.net library?
发布评论
评论(2)
这取决于您将要达到的级别。
如果您需要编写自己的 SQL 查询,请至少熟悉 ado.net(连接、命令、阅读器)。
如果您将使用 OR-Mapper(对象关系映射器),请查看 实体框架或linq-to-sql。
除此之外,熟悉 LINQ。它将帮助你解决很多早期困难和臃肿的事情。
It depends on the level you will work on.
If you need write your own sql queries, get familiar with at least the core components of ado.net (Connection, Command, Reader).
If you will be using OR-Mapper (object-relational mapper), look into the entity framework or linq-to-sql.
Besides that, get familiar with LINQ. It will help you with a lot of things that were hard and bloaty in earlier times.
实体框架是一个很好的起点,特别是当数据库已经存在时那里。最好的部分是它是 .Net 堆栈的一部分,因此您不需要其他包。
Entity Framework is a great place to start, particularly when the database is already there. Best part is it's part of the .Net stack so you don't need other packages.