-
-
Save jakcharlton/990473 to your computer and use it in GitHub Desktop.
EF mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Order | |
{ | |
public int OrderId {get; private set;} | |
public List<Orderlines> Orderlines {get; private set;} | |
} | |
public class Orderline | |
{ | |
public string Item {get; private set;} | |
public int Quantity {get;private set;} | |
} | |
// to table | |
// OrderId int : 503 | |
// OrderLines varchar : {{ Item: 'book', Quantity : 2 }, { Item: 'toy', Quantity : 6 }} | |
// or | |
// OrderId int : 503 | |
// OrderLines xml : <Orderlines><Line><Item>book</item><Quantity>2</Quantity></Line><Line><Item>'toy'</Item><Quantity>6</Quantity></Line></Orderlines> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment