Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: .NET Framework OR Mapping Pin
Kannan Kalyanaraman11-Dec-02 22:32
Kannan Kalyanaraman11-Dec-02 22:32 
GeneralRe: .NET Framework OR Mapping Pin
behrang Javaaherian11-Dec-02 22:55
behrang Javaaherian11-Dec-02 22:55 
GeneralRe: .NET Framework OR Mapping Pin
leppie12-Dec-02 8:06
leppie12-Dec-02 8:06 
GeneralRe: .NET Framework OR Mapping Pin
behrang Javaaherian13-Dec-02 19:07
behrang Javaaherian13-Dec-02 19:07 
GeneralRe: .NET Framework OR Mapping Pin
leppie13-Dec-02 23:32
leppie13-Dec-02 23:32 
GeneralRe: .NET Framework OR Mapping Pin
behrang Javaaherian13-Dec-02 23:56
behrang Javaaherian13-Dec-02 23:56 
GeneralRe: .NET Framework OR Mapping Pin
leppie14-Dec-02 0:17
leppie14-Dec-02 0:17 
GeneralRe: .NET Framework OR Mapping Pin
behrang Javaaherian14-Dec-02 1:02
behrang Javaaherian14-Dec-02 1:02 
The Idea i used in my code is like the idea which the EO developer team done in Enterprise Objects. I assumed each table in database have CLASS column. in this class I hold the class of the object which should be instansiated. all the objects are derived from a base class Called Entity. The Entity class is the core class for my framework. I get Entity Objects from another SingleTone class called EntityManager. The code would be like this:
Entity en = EntityManager.getEntity("Party",new EntityKey(123));
this means loading entity which the parent of it is Partey and the primary key is 123 .
The EntityKey is another object. I used this object to be able to have none-numeric primary keys.
The FrameWork First Load the XML File which describe the Party. (Party.XML for example) this Descriptor shows the Primarykey field and also Table name of the Party ( For exmaple pk , Party)
then a Query command for getting the class the sql command is : "SELECT CLASS FROM PARTY WHERE pk=123".
The Query will return For example PERS. the program will create the appropiate class name (Forexample Model.Person) this class should be inherited from Entity. now the Framework loads the person.Xml , find the properties from descriptor and create appropiate SQL Command for loading other information of the Person. The Simple attribute have no problem. The problem is with relations. Suppose a Person have a relation to another Object in another table. The Framework can work in to different way :
Load it when the Parent Object loaded ( Early)
Load when access to it required (Lazy)
the lazy loading is done through proxy objects ( refer to design pattern book to see what is Proxy Object).
Regards
BehrangSmile | :)

GeneralRe: .NET Framework OR Mapping Pin
leppie14-Dec-02 1:14
leppie14-Dec-02 1:14 
GeneralRe: .NET Framework OR Mapping Pin
leppie14-Dec-02 1:29
leppie14-Dec-02 1:29 
GeneralRe: .NET Framework OR Mapping Pin
behrang Javaaherian14-Dec-02 1:33
behrang Javaaherian14-Dec-02 1:33 
GeneralRe: .NET Framework OR Mapping Pin
MikeDoerfler12-Dec-02 2:42
MikeDoerfler12-Dec-02 2:42 
GeneralRe: .NET Framework OR Mapping Pin
behrang Javaaherian12-Dec-02 3:57
behrang Javaaherian12-Dec-02 3:57 
GeneralRe: .NET Framework OR Mapping Pin
MikeDoerfler12-Dec-02 4:33
MikeDoerfler12-Dec-02 4:33 
Generallaunching file search window programmatically Pin
Anonymous11-Dec-02 17:44
Anonymous11-Dec-02 17:44 
GeneralRe: launching file search window programmatically Pin
Kannan Kalyanaraman11-Dec-02 18:45
Kannan Kalyanaraman11-Dec-02 18:45 
GeneralRe: launching file search window programmatically Pin
AJ7012-Dec-02 9:16
sussAJ7012-Dec-02 9:16 
GeneralResources- I'm lost! Pin
peterchen11-Dec-02 12:29
peterchen11-Dec-02 12:29 
GeneralRe: Resources- I'm lost! Pin
Nick Parker11-Dec-02 16:54
protectorNick Parker11-Dec-02 16:54 
GeneralC# ActiveX Pin
11-Dec-02 10:47
suss11-Dec-02 10:47 
GeneralRe: C# ActiveX Pin
Adrian Hall17-Dec-02 15:09
Adrian Hall17-Dec-02 15:09 
GeneralSDLDMO and a Detached Pin
Paul Watson11-Dec-02 9:36
sitebuilderPaul Watson11-Dec-02 9:36 
GeneralRe: SDLDMO and a Detached Pin
Nick Parker11-Dec-02 9:55
protectorNick Parker11-Dec-02 9:55 
GeneralRe: SDLDMO and a Detached Pin
Paul Watson11-Dec-02 10:08
sitebuilderPaul Watson11-Dec-02 10:08 
GeneralRe: SDLDMO and a Detached Pin
Nick Parker11-Dec-02 16:20
protectorNick Parker11-Dec-02 16:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.