...ORMSupportClasses.NET20 & .CF20 in one class?

Posts   
 
    
Rushmore
User
Posts: 125
Joined: 27-Jan-2005
# Posted on: 31-Oct-2006 10:55:51   

Hi,

I want to create a business class that supports .NET20 & CF20. But how can I tell the compiler which assembly to use? I can“t reference both runtimelibraries because of the identical namespace (SD.LLBLGen.Pro.ORMSupportClasses).

My idea is to have only one buisness layer project for desktop and device applications which deals with the generated (dal) code (adapter scenario).

Any suggestions?

Regards, Carlo

I am using LLBLGen 2.0 (Sep. 13th, 2006), the latest runtimelibraries and templates.

Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 31-Oct-2006 18:02:22   

Hi,

I guess you can do as Frans did with the ORMSupportClasses:

the same source files make up both the .Net 2.0 and CF.Net 2.0 dlls. 2 different makefiles compile to the target plateform while referencing the corresponding dlls. I guess you could also make it with two class libs projects referencing the same files.

Then you also have explicit instructions in the source code to switch when the core cf system libs can't provide the same syntax. ex from entitybase2:

#if CF
            _objectID = GeneralCFUtilities.CreateNewGuid();
#else
            _objectID = Guid.NewGuid();
#endif

Now, you may also use OpenNetCf.Net which should compensate for most of what the core CF lacks.

Cheers

Rushmore
User
Posts: 125
Joined: 27-Jan-2005
# Posted on: 01-Nov-2006 09:03:33   

Jessynoo wrote:

Now, you may also use OpenNetCf.Net which should compensate for most of what the core CF lacks.

Thank you for your reply, I will give it try.

Regards, Carlo