哪一个是MVC4中最好的 [英] Which one is the best in MVC4

查看:90
本文介绍了哪一个是MVC4中最好的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好....



哪种方法最适合实体框架。?

1).Code First 2).Data首先

如果我创建sql数据库并使用代码第一种方法然后自动其他表

创建就好(员工已经在那里,但一个新表创建Emplyees)



&我使用Data First并在类文件中添加验证并即时更新EDMX然后

自动删除验证。



给我一个完美的解决方案哪个是最好的例子..为什么.. ??

Hello....

Which approach is best in entity framework.?
1).Code First 2).Data First
If i m create sql Database and use code first approach then automatic other table
create just like(Employee already there but one new table create Emplyees)

& I m use Data First and i m add validation in class file and i m update EDMX then
automatic remove validation.

Give me perfect solution which one is the best with example .. Why..??

推荐答案

没有完美的解决方案。 />


首先你应该阅读关于

的教程 http://www.asp.net/mvc/overview/models-( data) [ ^ ]

处理这两种方法。



如果必须连接到现有的数据库,代码首先不是一个选项。

如果你要开发一个数据库,那么代码首先可能会加快你的开发速度。
There is no perfect solution.

First you should read the tutorials on
http://www.asp.net/mvc/overview/models-(data)[^]
which deal with both approaches.

If you must connect to an existing database, code first is not an option.
If you are going to develop a database then code first might speed up
your development.


这篇关于哪一个是MVC4中最好的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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