Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Created May 22, 2017 21:58
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/9d4f47a85d4944fb55a888aff57a84a3 to your computer and use it in GitHub Desktop.
Save dsibinski/9d4f47a85d4944fb55a888aff57a84a3 to your computer and use it in GitHub Desktop.
[Table("Employees")]
public class Employee
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Name { get; set; }
public string LastName { get; set; }
}
[Table("Duties")]
public class Duty
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Description { get; set; }
public DateTime Deadline { get; set; }
[ForeignKey(typeof(Employee))]
public int EmployeeId { get; set; }
[ManyToOne]
public Employee Employee { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment