I'd like to define maps for my entities to my view model objects in ASP.NET MVC - and have DO implicitly include the required fields as a prefetch. For example, assume I have a Customer entity with a Name (string) and BillingAddress (Address entity). I have a CustomerViewModel object with Name and City properties... and I'd like Customer.Name and Customer.BillingAddress.City to map to the view model's properties, respectively. Will DO include BillingAddress and the necessary fields in a prefetch, so that this can be accomplished with one query (or at least one trip to the DB)? ... Finally, is there any formal documentation on the mapper? I don't even know how to get starting with mapping. |
True, O2O mapper isn't responsible for prefetch at all. If you'd like to ensure something is prefetched, you should do this prior to transformation - by either using prefetch API, or by running the queries directly. Possibly future version of this API will support automatic prefetches. |
Just figured out the basics of the mapper.
Unfortunately, seems like it does not prefetch.