Created
October 30, 2012 11:40
-
-
Save hudo/3979750 to your computer and use it in GitHub Desktop.
webshop model
This file contains 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
public class Product | |
{ | |
public int ProductId { get; set; } | |
public int Name { get; set; } | |
public decimal Price { get; set; } | |
public virtual Category Category { get; set; } | |
} | |
public class Category | |
{ | |
public int CategoryId { get; set; } | |
public string Title { get; set; } | |
public virtual ICollection<Product> Products { get; set; } | |
} | |
public class StoreContext : DbContext | |
{ | |
public DbSet<Product> Products { get; set; } | |
public DbSet<Category> Categories { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment