Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I need some one to help me to implement the below scenario

I have three model ,Employee and Position,employeepostion.

While creating the employee I need to bind this postion values from postion table (I know to do using viewbag or tempdata, I need other way to bind) and when click on save I need to save in two tables,Employee and EmployeePosition.

Can anyone help me with steps to do this.I am doing with different layers (repository pattern I am using).
Posted
Comments
Nathan Minier 22-Jan-15 7:33am    
Make a ViewModel that includes the pertinent employee fields as well as a position ID (assuming that EmployeePosition is a M-to-M mapping table) and use the ViewModel class to populate the pertinent Employee and EmployeePosition models.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900