我是MVC的初学者。我不想使用实体框架与DB通信。帮我举个例子。 [英] Im beginner with MVC. I dont want to use entity framework to communicate with DB. Help me with example.

查看:67
本文介绍了我是MVC的初学者。我不想使用实体框架与DB通信。帮我举个例子。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是MVC的初学者。我不想使用实体框架与DB通信。请帮我举例。

Im beginner with MVC. I dont want to use entity framework to communicate with DB. Help me with example.

推荐答案

我建​​议你学习ADO.NET的基础知识。这篇非常明确的文章将帮助您立即开始:为初学者使用ADO.NET [ ^ ]。



-SA
I would advise you to learn the basics of ADO.NET. This very clear article will help you to get started in no time: Using ADO.NET for beginners[^].

—SA


好的,没有什么可以说你必须使用EF 。



您可以使用标准.NET Framework方法自行编写自己的数据层代码。网上有大量的例子。你只需要谷歌C#SQL数据库。
OK, there's nothing that say you have to use EF.

You can just write your own data layer code yourself using standard .NET Framework methods. There are tons and tons of examples of this all over the web. You just need to Google for "C# SQL database".


我喜欢使用LinqToSQL,它为你设置了很多...这比从头做它更容易但它不是像EF一样片状。我最近在一个MVC项目中使用了EF,我无法快速摆脱它!
I like using LinqToSQL, it sets up a lot for you...that makes it easier than doing it from scratch but it isn't as flaky as EF. I used EF on an MVC project recently and I could't get rid of it fast enough!


这篇关于我是MVC的初学者。我不想使用实体框架与DB通信。帮我举个例子。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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