Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Last active May 21, 2017 10:17
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 dsibinski/6b5c7250deff7193c3e127dde2c2a947 to your computer and use it in GitHub Desktop.
Save dsibinski/6b5c7250deff7193c3e127dde2c2a947 to your computer and use it in GitHub Desktop.
[Table("RegistrationCertificates")]
public class RegistrationCertificate
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string RegistrationNumber { get; set; }
public string VIN { get; set; }
public string OwnerData { get; set; }
// added to have Inversion relationship
[ForeignKey(typeof(Vehicle))]
public int VehicleId { get; set; }
[OneToOne]
public Vehicle Vehicle { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment