Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Customer
- {
- public Customer
- {
- this.Orders = new HashSet<Orders>();
- }
- public int Id {get; set;}
- public virtual ICollection<Order> Orders{ get; set; }
- }
- public class Order
- {
- public int Id {get; set;}
- public Customer Customer { get; set; }
- [ForeignKey("Customer ")]
- public int? CustomerId { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement