Last active
May 18, 2017 20:27
-
-
Save dsibinski/1b0f1411d6478c7bebc55a451fbda068 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Person class modelling People table | |
[Table("People")] | |
public class Person | |
{ | |
[PrimaryKey, AutoIncrement] | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public string LastName { get; set; } | |
public string PhoneNumber { get; set; } | |
public string Email { get; set; } | |
[ManyToMany(typeof(PersonEvent))] | |
public List<Event> Events { get; set; } | |
} | |
// Event class modelling Events table | |
[Table("Events")] | |
public class Event | |
{ | |
[PrimaryKey, AutoIncrement] | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public DateTime Date { get; set; } | |
public string Place { get; set; } | |
[ManyToMany(typeof(PersonEvent))] | |
public List<Person> Participants { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment