开发者

asp net mvc sql server problem

开发者 https://www.devze.com 2023-02-09 09:54 出处:网络
how do i implement the ORM for my existing database tab开发者_如何学Pythonles ( that resides on the sql server )

how do i implement the ORM for my existing database tab开发者_如何学Pythonles ( that resides on the sql server ) to fit with asp net mvc3 ?

i tried to create all the table properties (pocos) by hand and build and it wont map it properly, i hope someone can point me in the right direction.

thanks :)


If you are using entity framework, build you entities based off of the current database. When you start a new entity in your project you are asked if you want to build from a current database or empty.


i saw the answer http://weblogs.asp.net/scottgu/archive/2010/08/03/using-ef-code-first-with-an-existing-database.aspx

basically the steps when building an asp mvc using an existing database

  1. install your asp mvc3 on your vs2010
  2. download & install the Entity Framework 4 CTP 5
  3. and follow the instruction from http://www.asp.net/mvc/tutorials/creating-model-classes-with-the-entity-framework-cs to build a set of models from your existing database

:)

thanks a lot @Adam & @Brett

more power!


Check Asp.net theres a lot of tutorial about asp.net mvc to start of.. you can start at storefront or nerdinner.

Asp.net MVC Regards.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号