Guest User

Untitled

a guest
Nov 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. +----------------------+
  2. Class
  3. +----------------------+
  4. Student_Id (FK, null)
  5. +----------------------+
  6.  
  7. public class Student
  8. {
  9. public virtual List<Class> Classes { get; }
  10. }
  11.  
  12. public class Class
  13. {
  14. public string Name { get; }
  15. }
  16.  
  17. public class StudentOverride : IAutoMappingOverride<Student>
  18. {
  19. public void Override(AutoMapping<Student> mapping)
  20. {
  21. mapping
  22. .HasMany(aggregate => aggregate.Prescriptions).Cascade.AllDeleteOrphan();
  23. }
  24. }
Add Comment
Please, Sign In to add comment