由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - MVC Project 如何利用EF(reverse model) Data Binding 已有的数据库?
相关主题
版上的童鞋们,你们升到VS2012了吗?Microsoft Launch 2010 Events
今年的TechEdMVC is trend?
Visual Studio 2012 and .net 4.5 Release candidate available for downloadAnyone uses LLBLGen Pro?
用了几个小时VS2012RC 我的眼睛快瞎了Reason that hold me from upgrating to vs2008
Visual Studio 2012 只能在Win 8才能使用吗Is there LINQ for VS 2005?
vs2013请问关于:Modeling Tools and Version Control -- Visual St
anyone tried vs2010 beta2?衷心祝愿 WINDOWS 7 顺利发售,一统江湖!
How to use a shared project in both VS2010 and VS2008?EF4看起来还不错
相关话题的讨论汇总
话题: model话题: mvc话题: data话题: use话题: reverse
进入DotNet版参与讨论
1 (共1页)
w*******7
发帖数: 188
1
You can use "Entity Framework" to create a model from a database, WPF and
Window Form can consume this model. I am not sure about Webform (I think it
could).
But for MVC, the reverse engineering model is used ObjectSet and Objectquery
, Is there any way to implement the model directly in MVC as Data Domain?
Or you have to use code first to build the data model and set connectting
string to direct connect to database?
H*******g
发帖数: 6997
2
Data Respository
LLBLGEN FTW
k****i
发帖数: 1072
3
POCO

it
Objectquery

【在 w*******7 的大作中提到】
: You can use "Entity Framework" to create a model from a database, WPF and
: Window Form can consume this model. I am not sure about Webform (I think it
: could).
: But for MVC, the reverse engineering model is used ObjectSet and Objectquery
: , Is there any way to implement the model directly in MVC as Data Domain?
: Or you have to use code first to build the data model and set connectting
: string to direct connect to database?

w*******7
发帖数: 188
4
According to Julie's blog, if you use EF5 and VS2012, you can "uses a code
generator that spits out POCO entity classes managed by a DbContext by
default rather than the EntityObject based classes managed by the
ObjectCpntext as it did for VS2008 and VS2010."
http://thedatafarm.com/blog/data-access/getting-started-with-ef
I used "code first" to build a db and use "DB first" to reverse-engineering
a model (You can use such as model.tt to rebuild you data model) and
compared with previous class, basically you can not directly to use them (no
annotation etc...).
But it gives you a reference to build "code first" model, I think so far "
code first" should be first choose for your MVC project.

【在 k****i 的大作中提到】
: POCO
:
: it
: Objectquery

k****i
发帖数: 1072
5
Tool肯定有,免费的收费的自己找找。
除非你有很多existing tables.I prefer to write the POCO classes myself.

engineering
no

【在 w*******7 的大作中提到】
: According to Julie's blog, if you use EF5 and VS2012, you can "uses a code
: generator that spits out POCO entity classes managed by a DbContext by
: default rather than the EntityObject based classes managed by the
: ObjectCpntext as it did for VS2008 and VS2010."
: http://thedatafarm.com/blog/data-access/getting-started-with-ef
: I used "code first" to build a db and use "DB first" to reverse-engineering
: a model (You can use such as model.tt to rebuild you data model) and
: compared with previous class, basically you can not directly to use them (no
: annotation etc...).
: But it gives you a reference to build "code first" model, I think so far "

1 (共1页)
进入DotNet版参与讨论
相关主题
EF4看起来还不错Visual Studio 2012 只能在Win 8才能使用吗
NHibernatevs2013
C# 自定义计时器问题anyone tried vs2010 beta2?
问下哪里有英文版visual studio 2010下How to use a shared project in both VS2010 and VS2008?
版上的童鞋们,你们升到VS2012了吗?Microsoft Launch 2010 Events
今年的TechEdMVC is trend?
Visual Studio 2012 and .net 4.5 Release candidate available for downloadAnyone uses LLBLGen Pro?
用了几个小时VS2012RC 我的眼睛快瞎了Reason that hold me from upgrating to vs2008
相关话题的讨论汇总
话题: model话题: mvc话题: data话题: use话题: reverse