Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Station : IEntitie
- {
- [Key]
- public int Id { get; set; }
- public string Description { get; set; }
- }
- public class OperativeSchedule : IEntitie
- {
- [Key]
- public int Id { get; set; }
- public virtual Station DispatchStation { get; set; } //для таблицы station надо задать ключ
- public virtual Station StationOfDestination { get; set; } //для таблицы station надо задать ключ
- }
- modelBuilder.Entity<Product>()
- .HasOptional(p => p.Category)
- .WithMany()
- .WillCascadeOnDelete(true);
Add Comment
Please, Sign In to add comment