Skip to content

Instantly share code, notes, and snippets.

@ssougnez
Last active July 14, 2018 14:15
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 ssougnez/2570fce40ce5b5f751c7f0e8f3725a2d to your computer and use it in GitHub Desktop.
Save ssougnez/2570fce40ce5b5f751c7f0e8f3725a2d to your computer and use it in GitHub Desktop.
[TableName("ActorMovie")]
[PrimaryKey("ActorId, MovieId", autoIncrement = false)]
[ExplicitColumns]
public class ActorMovie
{
[Column("ActorId")]
[PrimaryKeyColumn(OnColumns = "ActorId, MovieId", AutoIncrement = false)]
[ForeignKey(typeof(Actor), Name = "FK_ActorMovie_ActorId")]
public int ActorId { get; set; }
[Column("MovieId")]
[ForeignKey(typeof(Movie), Name = "FK_ActorMovie_MovieId")]
public int MovieId { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment