I am new to mvc and mvc 3 , I have a db that contain a company table (string id =as the company name )
And a table tourism that contain same info I would like to be able to add data to the tourism table , while selecting a company from the list (that came from t开发者_开发知识库he company table) (The two tables had a dependency vie company_id (and the same name in both)) How can I do it? Leo_a
- create a transaction
- insert into the dependent table
- inserrt into the main table
- commit
I'm not sure I understand the question. You want to select from one table and update the other with the data you selected from the first? Do you have any sample code you can post?
精彩评论