I don't think you can do that directly,and in my mind,I think you can try to check whether a specific student instance has IEnumerable<Course> Course is null or its Count is larger than 0 or not,before you do inserting it into your db。
Reguards!
Marked as answer by ZahidBashir on Mar 03, 2012 09:26 AM
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: MVC 2 Validating Many to Many Property
Mar 03, 2012 12:20 AM|LINK
Hello:)
I don't think you can do that directly,and in my mind,I think you can try to check whether a specific student instance has IEnumerable<Course> Course is null or its Count is larger than 0 or not,before you do inserting it into your db。
Reguards!