Skip to content

Instantly share code, notes, and snippets.

@DmitrySikorsky
Created December 1, 2017 10:25
Show Gist options
  • Save DmitrySikorsky/4366635b2774e7685723c4ee6e68cc9b to your computer and use it in GitHub Desktop.
Save DmitrySikorsky/4366635b2774e7685723c4ee6e68cc9b to your computer and use it in GitHub Desktop.
public class Category
{
public int Id { get; set; }
public string Name { get; set; }
public ICollection<Article> Articles { get; set; }
}
public class Article
{
public int Id { get; set; }
public int CategoryId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public decimal Price { get; set; }
public DateTime Created { get; set; }
public virtual Category Category { get; set; }
public virtual ICollection<Photo> Photos { get; set; }
}
public class Photo
{
public int Id { get; set; }
public int ArticleId { get; set; }
public string Filename { get; set; }
public bool IsDefault { get; set; }
public virtual Article Article { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment