Jul 7, 2010 at 8:02 PM
Edited Jul 7, 2010 at 8:05 PM
I am having a little problem mapping a domain object that contains a domain object.
Vendor -- another domain object
When I execute my SQL statement: "SELECT Id, Name, Vendor FROM Product WHERE Id = 1", it won't map the vendor field. The vendor field in the product table is a guid for the vendor ID in the vendor table.
So I am using a mapper like this: IRowMapper<Product> rowMapper = MapBuilder<Product>.MapAllProperties()
.DoNotMap(a => a.Vendor)
This doesn't work. I can get everything back fine except for the vendor id. I assume that the vendor object needs to be instantiated before it can be assigned a value, but how would I do something like that using DAAB?
BTW, I love the new additions to the DAAB.