开发者

asp.net mvc table naming question

I am new to ASP.NET MVC and see that tables should be named in a convention to allow the framework to work correctly.

开发者_运维问答

I have to build a web front end in MVC based on existing tables with names I cannot change / control.

How do I build this into my MVC application, can I use this existing tables?

Thanks Paul


If you are going to use an ORM, such as Entity Framework 4, and then bind the created entitys (pocos) to the MVC UI then you can do table/column mapping so you're not stuck with the names in the db.

http://weblogs.asp.net/scottgu/archive/2010/07/23/entity-framework-4-code-first-custom-database-schema-mapping.aspx

Hope it helps.


By "tables" you mean "database tables"? If so, ASP.NET MVC is not tied to a database, you can use whatever name you want. You define what will be the name convention of your tables.

By the way, if you already have all database schema working properly, you can look at the Entity Framework, it generates all your Data Access code and entities based on an existing schema.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜