tag:blogger.com,1999:blog-2629608947246129428.post968354216371605057..comments2024-02-18T05:01:43.733-07:00Comments on Reference Bits: AAPL Part 7: Building a Generic Data MapperRudy Lacovarahttp://www.blogger.com/profile/15639782534216467791noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-2629608947246129428.post-18138703307575250732011-09-01T14:10:44.112-06:002011-09-01T14:10:44.112-06:00Hi Rudy, I really appreciate this entire series, i...Hi Rudy, I really appreciate this entire series, it's been a fantastic example that's helped make a lot of sense of things for me. <br /><br />One area that I'm not as clear on when using DTO's and such is how do you handle Parent/Child relationships? Do you hydrate in all of the child records with the initial object, or do you defer them somehow? Can you point me towards any good examples?<br /><br />Thanks again!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-64146994023488886202011-03-17T07:11:18.032-06:002011-03-17T07:11:18.032-06:00Rudy, thanks for taking the time to write up this ...Rudy, thanks for taking the time to write up this series of articles. I'm getting back into .NET after 6 yrs of no coding at all, so I'm a little rusty. Is there a reason you have the Persistence classes instead of simply putting the Insert, Update, and Delete methods in Service classes?Scrappin' Natural Mamahttps://www.blogger.com/profile/15377828173061785977noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-53466423033267989162011-02-01T13:49:06.709-07:002011-02-01T13:49:06.709-07:00This is a great design! I like the no-nonsense app...This is a great design! I like the no-nonsense approach of getting rid of the fact that "we're going to have to code to switch db's from SQL Server to Oracle...". That's never happened for me, esp. working in a Microsoft world.<br /><br />Anyhow, if you just cached the property-to-table column information once you reflected it from all your domain objects, you'd get rid of that one bottleneck.<br /><br />Besides that, really cool approach to Data Mapper!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-18804164462000933042011-01-10T12:34:42.732-07:002011-01-10T12:34:42.732-07:00@Hank, thanks. I'm sad to say I really don...@Hank, thanks. I'm sad to say I really don't know much about Dynamic in 4.0. It's on my list but I haven't dug into it yet. That's a good thought though. I've also thought about taking a closer look at Jimmy Bogard's AutoMapper. It would be nice to use AutoMapper and get it's rich feature set, but I'm not sure if I could make AutoMapper work with an IDataReader. I'll have to check it out. Might be a nice feature to contribute to AutoMapper.Rudy Lacovarahttps://www.blogger.com/profile/15639782534216467791noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-76631242593182856872011-01-10T10:18:10.367-07:002011-01-10T10:18:10.367-07:00Great stuff. Have you looked at what the Generic ...Great stuff. Have you looked at what the Generic DataMapper would look like using Dynamic in 4.0? The reason I ask is that call-site caching might (???) improve performance over reflection, on subsequent passes.Hank Fayhttps://www.blogger.com/profile/01493468995752296711noreply@blogger.com