daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Feb 17th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Course
  2. {
  3.     public int Id {get; set;}
  4.     public Curriculum { get; set; }
  5. }
  6.  
  7.  
  8. public class Curriculum
  9. {
  10.     [ForeignKey("Course")]
  11.     public int Id { get; set; }    
  12.  
  13.     pubic Course Course { get; set; }    
  14. }
  15.    
  16. public class CourseConfiguration : EntityTypeConfiguration<Course>
  17. {
  18.     public CourseConfiguration()
  19.     {
  20.         HasOptional(course => course.Curriculum)
  21.             .WithRequired(cur => cur.Course);
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top