Imagara 2 gadi atpakaļ
vecāks
revīzija
5f38257fe5

+ 10 - 0
RaspisKusach/Routes.cs

@@ -14,11 +14,21 @@ namespace RaspisKusach
     
     public partial class Routes
     {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Routes()
+        {
+            this.Tickets = new HashSet<Tickets>();
+        }
+    
         public int IdRoute { get; set; }
         public int IdTrain { get; set; }
         public string Departure_Station { get; set; }
         public string Arrival_Station { get; set; }
         public System.DateTime Departure_Date { get; set; }
         public System.DateTime Arrival_Date { get; set; }
+    
+        public virtual Trains Trains { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Tickets> Tickets { get; set; }
     }
 }

+ 4 - 0
RaspisKusach/Tickets.cs

@@ -21,5 +21,9 @@ namespace RaspisKusach
         public int PlaceNumber { get; set; }
         public int Category { get; set; }
         public System.DateTime BuyDate { get; set; }
+    
+        public virtual Routes Routes { get; set; }
+        public virtual TrainsCarriages TrainsCarriages { get; set; }
+        public virtual Users Users { get; set; }
     }
 }

+ 9 - 0
RaspisKusach/Trains.cs

@@ -14,7 +14,16 @@ namespace RaspisKusach
     
     public partial class Trains
     {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Trains()
+        {
+            this.Routes = new HashSet<Routes>();
+        }
+    
         public int IdTrain { get; set; }
         public string NameOfTrain { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Routes> Routes { get; set; }
     }
 }

+ 9 - 0
RaspisKusach/TrainsCarriages.cs

@@ -14,7 +14,16 @@ namespace RaspisKusach
     
     public partial class TrainsCarriages
     {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public TrainsCarriages()
+        {
+            this.Tickets = new HashSet<Tickets>();
+        }
+    
         public int IdCarriage { get; set; }
         public int Count { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Tickets> Tickets { get; set; }
     }
 }

+ 9 - 0
RaspisKusach/Users.cs

@@ -14,6 +14,12 @@ namespace RaspisKusach
     
     public partial class Users
     {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Users()
+        {
+            this.Tickets = new HashSet<Tickets>();
+        }
+    
         public int IdUser { get; set; }
         public string Login { get; set; }
         public string Password { get; set; }
@@ -21,5 +27,8 @@ namespace RaspisKusach
         public string Surname { get; set; }
         public string Name { get; set; }
         public string Patronymic { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Tickets> Tickets { get; set; }
     }
 }