The Artima Developer Community
Sponsored Link

C# Answers Forum
Persistence Facade using C# Generics

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bob Lawson

Posts: 1
Nickname: othersider
Registered: Sep, 2007

Persistence Facade using C# Generics Posted: Sep 17, 2007 12:12 PM
Reply to this message Reply
Advertisement
I'm trying to implement the Persistence Facade presented in Craig Larman's book called "Applying UML and Patterns". But this book was written prior to the availability of generics. The Facade class is not type safe, as the persistence objects are passed in as type object, then the facade determines what mapper to call based on the object's type. The mapper then has to typecast the object to the right type. My question is: how can you use a persistence facade with generics?

Topic: plz, how to shutdown???????? Previous Topic   Next Topic Topic: C# in Comparison to VB.net

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use