Skip to content

Instantly share code, notes, and snippets.

@paigecook
Created May 31, 2011 12:26
Show Gist options
  • Save paigecook/1000421 to your computer and use it in GitHub Desktop.
Save paigecook/1000421 to your computer and use it in GitHub Desktop.
EF Serialization Entity
using System.Collections.ObjectModel;
using System.Collections.Generic;
namespace MyTest
{
public class Person
{
public Person()
{
Tags = new Collection<Tag>();
}
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public ICollection<Tag> Tags { get; set; }
}
public class Tag
{
public Tag()
{
People = new Collection<Person>();
}
public int Id { get; set; }
public string Name { get; set; }
public ICollection<Person> People { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment