none
Mapping multiple (two) row into one entity – how to? RRS feed

  • Question

  • Hi,

    is it possible to map two or more rows of a table to one entity?

    The property to chose to map to should depend on some column value.

    Example:

    Table

    ¦ID not PK ¦ Condition ¦ ValueColumn¦

    Entity

    public class SomeEntity {

      [Column("ValueColumn")]

      ValueColumnConditionTrue {get; set;}

      [Column("ValueColumn")]

      ValueColumnConditionFalse {get; set;}

    }

    Thanks.


    Thursday, October 18, 2018 8:27 AM

All replies