PC Review


Reply
Thread Tools Rate Thread

Abstract Factory with NHibernate Repository

 
 
Sean Chambers
Guest
Posts: n/a
 
      19th Feb 2007
This is a fairly simple architecture question, just can't seem to wrap
my head around the answer.

I am using NHibernate 1.2 from the trunk to leverage generics support.

I have a User Table that has 4 different types of users:
Patron
Promoter
Admin

I am using generics in a Reospitory class to wrap NHibernate logic
within a Repository assembly. Upon login, I need to load the relevant
object depending on the usertype which is an integer column within
SQL, i.e. (Patron = UserType 2, Promoter = UserType 3, etc..)

I am having a hard time picturing how this would fit into my
repository at the time of selecting the entity from the backend and
then returning to my domain layer.

I am thinking maybe creating an abstract UserRepository class, that
would be where my factory code would be located and defer
instantiation to concrete PatronRepository, PromoterRepository etc..
classes.

Any help/guidance would be greatly appreciated! Thank you!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Abstract factory and Factory pattern C# Microsoft ASP .NET 4 31st Jul 2008 04:22 PM
Abstract factory and Factory pattern C# Microsoft C# .NET 4 31st Jul 2008 04:22 PM
Abstract factory and Factory pattern C# Microsoft VB .NET 4 31st Jul 2008 04:22 PM
About Factory Method and Abstract Factory (design pattern) Duy Lam Microsoft C# .NET 2 27th Nov 2007 02:55 PM
About Factory Method and Abstract Factory (design pattern) Duy Lam Microsoft Dot NET 0 14th Nov 2007 12:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:25 PM.