Adding Column Using Subsonic 3.0.0.5 Migration

本秂侑毒 提交于 2019-12-24 19:54:18

问题


I want to know that How to Insert New Columns to an existing database Table using Subsonic 3.0.0.5 MIGRATIONS.

Basically I want to alter an existing table in MS SqlServer database and add three more columns into it.

Please tell me How I will be able to do it

Regards,

Naveed Khan


回答1:


Just change your object and the column will be added/updated whatever. So if you have an object called "Post" and add a property, it will be added as a column in the DB.

See this video...

http://subsonicproject.com/docs/Simple_Repo_5_Minute_Demo




回答2:


It has to do with the conventions of SubSonic.
As the object is singular, it adds the plural to the table (or expects the table to be plural).
So it will expect an object called Order to map to a table called Orders.

There is only two solutions that I can see for you

1) Rename you table to the plural name.

2) Modify Subsonic code to remove the adding of the plural.



来源:https://stackoverflow.com/questions/1216383/adding-column-using-subsonic-3-0-0-5-migration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!