Inserting with GUID-key Scheme

Aug 5, 2011 at 1:00 PM

Hi there, first I'd like to thank you all for this framewinork, it's been a real time saver for me, very much appreciated!

I have one question though, is there any specific guidelines in using the GUID scheme, do I assign it myself using either a generic .NET version or OpenNETCF or does the ORM take care of that If don't specify it if I use a standard constructor, and set the fields using auto properties.

Also, I got a bonus one, I make heavy use of interfaces in my software, is there any interface for the data objects that I can inherit from or is it possible to still make use of them, together with the attributes.

For example I got a number of classes implementing IOutPutPort, ICard etc etc, where I store the configurations for the pins, I use them like this CardB.Interface.Out.PortB, I want to store some of PortB's settings in the DB, to make them persistent. Out is defined by the IOutPort interface, which inherits from IPort. IOutPutPort defines Send().... etc etc.. you get the point?

Again, thank you for your continued effort!

Coordinator
Aug 25, 2011 at 8:14 PM

Not sure how I missed this question - sorry for the delay.

Just leave the ID field empty and ORM should populate it for you when you do the insert.

The attributes should get inherited (I think I walk up the tree looking for inherited ones anyway).  If that's not the case, let me know and I'll fix it.