I'm an absolute noob in MVC :) Do you have some existing code that you can provide me with? models view and controller?
I don't have any existing code on-hand to walk you thru this.
Your models are going to be simple:
ProjectClass - int ProjectId, string ProjectName
EmployeeClass = int EmpId, string EmpName, bool IsActive // IsActive is your "visible" column true/false
RelClass = int RelId, ProjId, EmpId // this is your many to many class (Rel = relationships for naming purposes)
Here's how you'll handle the checkboxes:
http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx
Everything you require for this project can be obtained with a little research on your favorite search engine.
JohnLocke
Contributor
3008 Points
686 Posts
Re: MVC3 and Many to Many Relations SQL
Apr 06, 2012 05:21 PM|LINK
I don't have any existing code on-hand to walk you thru this.
Your models are going to be simple:
ProjectClass - int ProjectId, string ProjectName
EmployeeClass = int EmpId, string EmpName, bool IsActive // IsActive is your "visible" column true/false
RelClass = int RelId, ProjId, EmpId // this is your many to many class (Rel = relationships for naming purposes)
Here's how you'll handle the checkboxes:
http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx
Everything you require for this project can be obtained with a little research on your favorite search engine.