Skip to content

Instantly share code, notes, and snippets.

@jakcharlton
Created May 25, 2011 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakcharlton/990473 to your computer and use it in GitHub Desktop.
Save jakcharlton/990473 to your computer and use it in GitHub Desktop.
EF mapping
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