Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Meal
- {
- public int MealId { get; set; }
- public Recipe Recipe { get; set; }
- }
- public class Recipe
- {
- public int RecipeId { get; set; }
- public string Name { get; set; }
- public ICollection<RecipeItem> RecipeItems { get; set; }
- }
- modelBuilder.Entity<Meal>().HasOne(c => c.Recipe);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement