I'm retrieving data with Simple.Data - which maps the database table to a dynamic object. I want to map the dynamic object to a simple type. I have tried this:
var dbObject = Database.Default.LocationStatus.FindByLocationStatusId(locationStatusId);
ILocationStatus domainObject = new LocationStatus();
domainObject.InjectFrom((object)dbObject);
But no properties in the domainObject are set. The mapping should be simple as the property names are the same, ei: dbObject.Name and domainObject.Name
Where am I going wrong? Note: I can in fact magically cast (duck typing?) (LocationStatus)dbObject but I'd like to know how to map with ValueInjecter. Thanks.