no, you have to do something like this:
mapper.Class<Class>(map => map.Set(p => p.Students,
set => ....,
rel => rel.ManyToMany()));
Hava a look to this mapping in my restbucks example:
http://restbucks.codeplex.com/SourceControl/changeset/view/c318a36da791#RestBucks%2fData%2fMapper.cs
2011/7/26 Neo <[email protected]>
> How do I map properties as many to many using the new mapping by code?
>
> Let's say I have the following domain:
> public class Class {
> public virtual string Name { get; set; }
> public virtual ISet<Student> Students { get; set; }
> public Class() {
> Students = new HashedSet<Student>();
> }
> }
> public class Student {
> public virtual string Name { get; set; }
> public virtual ISet<Class> Classes { get; set; }
> public Student() {
> Classes = new HashedSet<Class>();
> }
> }
>
> the IsManyToMany delegate on ConventionModelMapper never seems to be
> invoked. Am I missing something?
>
> Cheers!
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.