Save an object without primary key ?

Jun 24, 2011 at 1:00 PM
Edited Jun 24, 2011 at 1:00 PM

Hello,

I need to create a table without primary key but Lephone doesn't save my object without primary key. So, how do I do, please ?

My object :

 

    [DbTable("thresholds"), Cacheable]
    public abstract class ThresholdRecord : IDbObject
    {
        public abstract BreedEnum Breed { get; set; }
        public abstract CaracteristicEnum Caracteristic { get; set; }
        public abstract short Threshold { get; set; }
        public abstract byte Cost { get; set; }

        public abstract ThresholdRecord Init(BreedEnum breed, CaracteristicEnum caracteristic, short threshold,
                                             byte cost);
    }

PS : I'm french.

Coordinator
Jun 24, 2011 at 2:20 PM

DbEntry.Context.Insert(obj);

DbEntry.Context.Update(obj);