Looks great!

Aug 24, 2011 at 12:52 PM

I'm trying out your framework and it looks great so far! I just have a few questions:

1. I'm trying to do the following mapping:


.For(x => x.Username).Map(x => new { x.LastName, x.FirstName }).Using(x => x.LastName + x.FirstName)
I then get the following error:
Fabrication.Exceptions.PropertySelectorException: Property selector must target a valid property.
Maybe I'm doing this wrong. What I'm trying to achieve is to make the username and last name/first name properties match. Is there a better way to do this?

2. Let's say I have Role and User. A Role has a collection of Users and User has a collection of Roles she's in. I would like to generate x amount of Roles, then generate x amount of Users, for each, putting them into a random x amount of roles. This means that I need to pick a random role, add the user to that role's users collection then take that same role that was picked and add it to the user's roles collection. Is there a way to represent this in the Setup?