@@ -10,11 +10,11 @@ public OrdersDetails()
1010
1111 }
1212 public OrdersDetails (
13- int OrderID , string CustomerId , string ShipCity , string ShipCountry )
13+ int OrderID , string CustomerId , int EmployeeId , string ShipCountry )
1414 {
1515 this . OrderID = OrderID ;
1616 this . CustomerID = CustomerId ;
17- this . ShipCity = ShipCity ;
17+ this . EmployeeID = EmployeeId ;
1818 this . ShipCountry = ShipCountry ;
1919 }
2020
@@ -25,20 +25,23 @@ public static List<OrdersDetails> GetAllRecords()
2525 int code = 10000 ;
2626 for ( int i = 1 ; i < 10 ; i ++ )
2727 {
28- order . Add ( new OrdersDetails ( code + 1 , "ALFKI" , "Berlin" , "Denmark" ) ) ;
29- order . Add ( new OrdersDetails ( code + 2 , "ANATR" , "Madrid" , "Brazil" ) ) ;
30- order . Add ( new OrdersDetails ( code + 3 , "ANTON" , "Cholchester" , "Germany" ) ) ;
31- order . Add ( new OrdersDetails ( code + 4 , "BLONP" , "Marseille" , "Austria" ) ) ;
32- order . Add ( new OrdersDetails ( code + 5 , "BOLID" , "tsawassen" , "Switzerland" ) ) ;
28+ order . Add ( new OrdersDetails ( code + 1 , "ALFKI" , i + 0 , "Denmark" ) ) ;
29+ order . Add ( new OrdersDetails ( code + 2 , "ANATR" , i + 2 , "Brazil" ) ) ;
30+ order . Add ( new OrdersDetails ( code + 3 , "ANTON" , i + 1 , "Germany" ) ) ;
31+ order . Add ( new OrdersDetails ( code + 4 , "BLONP" , i + 3 , "Austria" ) ) ;
32+ order . Add ( new OrdersDetails ( code + 5 , "BOLID" , i + 4 , "Switzerland" ) ) ;
3333 code += 5 ;
3434 }
3535 }
3636 return order ;
3737 }
3838 [ Key ]
3939 public int ? OrderID { get ; set ; }
40+ [ Required ]
4041 public string ? CustomerID { get ; set ; }
41- public string ? ShipCity { get ; set ; }
42+ [ Required ]
43+ public int ? EmployeeID { get ; set ; }
44+ [ Required ]
4245 public string ? ShipCountry { get ; set ; }
4346 }
4447}
0 commit comments