Menu

How to use mapped object primarykey

Phil
2006-08-21
2013-04-22
  • Phil

    Phil - 2006-08-21

    Hi,
    In the 1.0.1 version the mapped object primary key has become a  System.Collections.Generic.List<object> .

    I do obj.PrimaryKey[0] to get the value. Is it the right way ?
    What is the reason the return a collection instead of an object ?

    regards

    Philippe

     
    • Dario

      Dario - 2006-08-22

      Hi Phil.
      The reason its called "Composite Primary Key".
      I use to write some properties like:

      public int Id
      {
        get
        {
          return ((int)PrimaryKey[0]);
        }
      }

      Best Regards
      Dario K.

       

Log in to post a comment.