Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Course
- {
- public int Id {get; set;}
- public Curriculum { get; set; }
- }
- public class Curriculum
- {
- [ForeignKey("Course")]
- public int Id { get; set; }
- pubic Course Course { get; set; }
- }
- public class CourseConfiguration : EntityTypeConfiguration<Course>
- {
- public CourseConfiguration()
- {
- HasOptional(course => course.Curriculum)
- .WithRequired(cur => cur.Course);
- }
- }
Add Comment
Please, Sign In to add comment