Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[TableName("Movies")]
[PrimaryKey("Id", autoIncrement = true)]
[ExplicitColumns]
public class Movie
{
[Column("Id")]
[PrimaryKeyColumn(AutoIncrement = true)]
public int Id { get; set; }
[Column("Title")]
public string Title { get; set; }
[Column("DirectorId")]
[ForeignKey(typeof(Director), Name = "FK_Movie_DirectorId")]
public int DirectorId { get; set; }
[ResultColumn]
public Director Director { get; set; }
[ResultColumn]
public List<Actor> Actors { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.