Skip to content

Commit 60f669a

Browse files
committed
Changed TABS to SPACES
1 parent cf09e41 commit 60f669a

File tree

4 files changed

+180
-47
lines changed

4 files changed

+180
-47
lines changed

EntityFramework.Reverse.POCO.Generator/Database NorthwindSqlCe40.cs

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,11 @@ public class Category
488488
public byte[] Picture { get; set; } // Picture (length: 1073741823)
489489

490490
// Reverse navigation
491-
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } // Products.Products_FK01
491+
492+
/// <summary>
493+
/// Child Products where [Products].[Category ID] point to this entity (Products_FK01)
494+
/// </summary>
495+
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } = new System.Collections.Generic.List<Product>(); // Products.Products_FK01
492496

493497
public Category()
494498
{
@@ -513,7 +517,11 @@ public class Customer
513517
public string Fax { get; set; } // Fax (length: 24)
514518

515519
// Reverse navigation
516-
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } // Orders.Orders_FK00
520+
521+
/// <summary>
522+
/// Child Orders where [Orders].[Customer ID] point to this entity (Orders_FK00)
523+
/// </summary>
524+
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } = new System.Collections.Generic.List<Order>(); // Orders.Orders_FK00
517525

518526
public Customer()
519527
{
@@ -543,7 +551,11 @@ public class Employee
543551
public int? ReportsTo { get; set; } // Reports To
544552

545553
// Reverse navigation
546-
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } // Orders.Orders_FK02
554+
555+
/// <summary>
556+
/// Child Orders where [Orders].[Employee ID] point to this entity (Orders_FK02)
557+
/// </summary>
558+
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } = new System.Collections.Generic.List<Order>(); // Orders.Orders_FK02
547559

548560
public Employee()
549561
{
@@ -571,11 +583,25 @@ public class Order
571583
public decimal? Freight { get; set; } // Freight
572584

573585
// Reverse navigation
574-
public virtual System.Collections.Generic.ICollection<OrderDetail> OrderDetails { get; set; } // Many to many mapping
586+
587+
/// <summary>
588+
/// Child OrderDetails where [Order Details].[Order ID] point to this entity (Order Details_FK01)
589+
/// </summary>
590+
public virtual System.Collections.Generic.ICollection<OrderDetail> OrderDetails { get; set; } = new System.Collections.Generic.List<OrderDetail>(); // Order Details.Order Details_FK01
575591

576592
// Foreign keys
593+
594+
/// <summary>
595+
/// Parent Customer pointed by [Orders].([CustomerId]) (Orders_FK00)
596+
/// </summary>
577597
public virtual Customer Customer { get; set; } // Orders_FK00
598+
/// <summary>
599+
/// Parent Employee pointed by [Orders].([EmployeeId]) (Orders_FK02)
600+
/// </summary>
578601
public virtual Employee Employee { get; set; } // Orders_FK02
602+
/// <summary>
603+
/// Parent Shipper pointed by [Orders].([ShipVia]) (Orders_FK01)
604+
/// </summary>
579605
public virtual Shipper Shipper { get; set; } // Orders_FK01
580606

581607
public Order()
@@ -595,7 +621,14 @@ public class OrderDetail
595621
public float Discount { get; set; } // Discount
596622

597623
// Foreign keys
624+
625+
/// <summary>
626+
/// Parent Order pointed by [Order Details].([OrderId]) (Order Details_FK01)
627+
/// </summary>
598628
public virtual Order Order { get; set; } // Order Details_FK01
629+
/// <summary>
630+
/// Parent Product pointed by [Order Details].([ProductId]) (Order Details_FK00)
631+
/// </summary>
599632
public virtual Product Product { get; set; } // Order Details_FK00
600633
}
601634

@@ -616,10 +649,21 @@ public class Product
616649
public bool Discontinued { get; set; } // Discontinued
617650

618651
// Reverse navigation
619-
public virtual System.Collections.Generic.ICollection<OrderDetail> OrderDetails { get; set; } // Many to many mapping
652+
653+
/// <summary>
654+
/// Child OrderDetails where [Order Details].[Product ID] point to this entity (Order Details_FK00)
655+
/// </summary>
656+
public virtual System.Collections.Generic.ICollection<OrderDetail> OrderDetails { get; set; } = new System.Collections.Generic.List<OrderDetail>(); // Order Details.Order Details_FK00
620657

621658
// Foreign keys
659+
660+
/// <summary>
661+
/// Parent Category pointed by [Products].([CategoryId]) (Products_FK01)
662+
/// </summary>
622663
public virtual Category Category { get; set; } // Products_FK01
664+
/// <summary>
665+
/// Parent Supplier pointed by [Products].([SupplierId]) (Products_FK00)
666+
/// </summary>
623667
public virtual Supplier Supplier { get; set; } // Products_FK00
624668

625669
public Product()
@@ -636,7 +680,11 @@ public class Shipper
636680
public string CompanyName { get; set; } // Company Name (length: 40)
637681

638682
// Reverse navigation
639-
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } // Orders.Orders_FK01
683+
684+
/// <summary>
685+
/// Child Orders where [Orders].[Ship Via] point to this entity (Orders_FK01)
686+
/// </summary>
687+
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } = new System.Collections.Generic.List<Order>(); // Orders.Orders_FK01
640688

641689
public Shipper()
642690
{
@@ -661,7 +709,11 @@ public class Supplier
661709
public string Fax { get; set; } // Fax (length: 24)
662710

663711
// Reverse navigation
664-
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } // Products.Products_FK00
712+
713+
/// <summary>
714+
/// Child Products where [Products].[Supplier ID] point to this entity (Products_FK00)
715+
/// </summary>
716+
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } = new System.Collections.Generic.List<Product>(); // Products.Products_FK00
665717

666718
public Supplier()
667719
{

EntityFramework.Reverse.POCO.Generator/Database.cs

Lines changed: 100 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,11 @@ public class Category
10181018
public byte[] Picture { get; set; } // Picture (length: 2147483647)
10191019

10201020
// Reverse navigation
1021-
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } // Products.FK_Products_Categories
1021+
1022+
/// <summary>
1023+
/// Child Products where [Products].[CategoryID] point to this entity (FK_Products_Categories)
1024+
/// </summary>
1025+
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } = new System.Collections.Generic.List<Product>(); // Products.FK_Products_Categories
10221026

10231027
public Category()
10241028
{
@@ -1059,8 +1063,15 @@ public class Customer
10591063
public string Fax { get; set; } // Fax (length: 24)
10601064

10611065
// Reverse navigation
1062-
public virtual System.Collections.Generic.ICollection<CustomerDemographic> CustomerDemographics { get; set; } // Many to many mapping
1063-
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } // Orders.FK_Orders_Customers
1066+
1067+
/// <summary>
1068+
/// Child CustomerDemographics (Many-to-Many) mapped by table [CustomerCustomerDemo]
1069+
/// </summary>
1070+
public virtual System.Collections.Generic.ICollection<CustomerDemographic> CustomerDemographics { get; set; } = new System.Collections.Generic.List<CustomerDemographic>(); // Many to many mapping
1071+
/// <summary>
1072+
/// Child Orders where [Orders].[CustomerID] point to this entity (FK_Orders_Customers)
1073+
/// </summary>
1074+
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } = new System.Collections.Generic.List<Order>(); // Orders.FK_Orders_Customers
10641075

10651076
public Customer()
10661077
{
@@ -1087,7 +1098,11 @@ public class CustomerDemographic
10871098
public string CustomerDesc { get; set; } // CustomerDesc (length: 1073741823)
10881099

10891100
// Reverse navigation
1090-
public virtual System.Collections.Generic.ICollection<Customer> Customers { get; set; } // Many to many mapping
1101+
1102+
/// <summary>
1103+
/// Child Customers (Many-to-Many) mapped by table [CustomerCustomerDemo]
1104+
/// </summary>
1105+
public virtual System.Collections.Generic.ICollection<Customer> Customers { get; set; } = new System.Collections.Generic.List<Customer>(); // Many to many mapping
10911106

10921107
public CustomerDemographic()
10931108
{
@@ -1119,11 +1134,25 @@ public class Employee
11191134
public string PhotoPath { get; set; } // PhotoPath (length: 255)
11201135

11211136
// Reverse navigation
1122-
public virtual System.Collections.Generic.ICollection<Employee> Employees { get; set; } // Employees.FK_Employees_Employees
1123-
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } // Orders.FK_Orders_Employees
1124-
public virtual System.Collections.Generic.ICollection<Territory> Territories { get; set; } // Many to many mapping
1137+
1138+
/// <summary>
1139+
/// Child Employees where [Employees].[ReportsTo] point to this entity (FK_Employees_Employees)
1140+
/// </summary>
1141+
public virtual System.Collections.Generic.ICollection<Employee> Employees { get; set; } = new System.Collections.Generic.List<Employee>(); // Employees.FK_Employees_Employees
1142+
/// <summary>
1143+
/// Child Orders where [Orders].[EmployeeID] point to this entity (FK_Orders_Employees)
1144+
/// </summary>
1145+
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } = new System.Collections.Generic.List<Order>(); // Orders.FK_Orders_Employees
1146+
/// <summary>
1147+
/// Child Territories (Many-to-Many) mapped by table [EmployeeTerritories]
1148+
/// </summary>
1149+
public virtual System.Collections.Generic.ICollection<Territory> Territories { get; set; } = new System.Collections.Generic.List<Territory>(); // Many to many mapping
11251150

11261151
// Foreign keys
1152+
1153+
/// <summary>
1154+
/// Parent Employee pointed by [Employees].([ReportsTo]) (FK_Employees_Employees)
1155+
/// </summary>
11271156
public virtual Employee Employee_ReportsTo { get; set; } // FK_Employees_Employees
11281157

11291158
public Employee()
@@ -1186,17 +1215,31 @@ public class Order
11861215
public string ShipCountry { get; set; } // ShipCountry (length: 15)
11871216

11881217
// Reverse navigation
1189-
public virtual System.Collections.Generic.ICollection<OrderDetail> OrderDetails { get; set; } // Many to many mapping
1218+
1219+
/// <summary>
1220+
/// Child OrderDetails where [Order Details].[OrderID] point to this entity (FK_Order_Details_Orders)
1221+
/// </summary>
1222+
public virtual System.Collections.Generic.ICollection<OrderDetail> Orders { get; set; } = new System.Collections.Generic.List<OrderDetail>(); // Order Details.FK_Order_Details_Orders
11901223

11911224
// Foreign keys
1225+
1226+
/// <summary>
1227+
/// Parent Customer pointed by [Orders].([CustomerId]) (FK_Orders_Customers)
1228+
/// </summary>
11921229
public virtual Customer Customer { get; set; } // FK_Orders_Customers
1230+
/// <summary>
1231+
/// Parent Employee pointed by [Orders].([EmployeeId]) (FK_Orders_Employees)
1232+
/// </summary>
11931233
public virtual Employee Employee { get; set; } // FK_Orders_Employees
1234+
/// <summary>
1235+
/// Parent Shipper pointed by [Orders].([ShipVia]) (FK_Orders_Shippers)
1236+
/// </summary>
11941237
public virtual Shipper Shipper { get; set; } // FK_Orders_Shippers
11951238

11961239
public Order()
11971240
{
11981241
Freight = 0m;
1199-
OrderDetails = new System.Collections.Generic.List<OrderDetail>();
1242+
Orders = new System.Collections.Generic.List<OrderDetail>();
12001243
}
12011244
}
12021245

@@ -1211,8 +1254,15 @@ public class OrderDetail
12111254
public float Discount { get; set; } // Discount
12121255

12131256
// Foreign keys
1214-
public virtual Order Order { get; set; } // FK_Order_Details_Orders
1215-
public virtual Product Product { get; set; } // FK_Order_Details_Products
1257+
1258+
/// <summary>
1259+
/// Parent Order pointed by [Order Details].([OrderId]) (FK_Order_Details_Orders)
1260+
/// </summary>
1261+
public virtual Order Details1 { get; set; } // FK_Order_Details_Orders
1262+
/// <summary>
1263+
/// Parent Product pointed by [Order Details].([ProductId]) (FK_Order_Details_Products)
1264+
/// </summary>
1265+
public virtual Product Details2 { get; set; } // FK_Order_Details_Products
12161266

12171267
public OrderDetail()
12181268
{
@@ -1285,10 +1335,21 @@ public class Product
12851335
public bool Discontinued { get; set; } // Discontinued
12861336

12871337
// Reverse navigation
1288-
public virtual System.Collections.Generic.ICollection<OrderDetail> OrderDetails { get; set; } // Many to many mapping
1338+
1339+
/// <summary>
1340+
/// Child OrderDetails where [Order Details].[ProductID] point to this entity (FK_Order_Details_Products)
1341+
/// </summary>
1342+
public virtual System.Collections.Generic.ICollection<OrderDetail> Products { get; set; } = new System.Collections.Generic.List<OrderDetail>(); // Order Details.FK_Order_Details_Products
12891343

12901344
// Foreign keys
1345+
1346+
/// <summary>
1347+
/// Parent Category pointed by [Products].([CategoryId]) (FK_Products_Categories)
1348+
/// </summary>
12911349
public virtual Category Category { get; set; } // FK_Products_Categories
1350+
/// <summary>
1351+
/// Parent Supplier pointed by [Products].([SupplierId]) (FK_Products_Suppliers)
1352+
/// </summary>
12921353
public virtual Supplier Supplier { get; set; } // FK_Products_Suppliers
12931354

12941355
public Product()
@@ -1298,7 +1359,7 @@ public Product()
12981359
UnitsOnOrder = 0;
12991360
ReorderLevel = 0;
13001361
Discontinued = false;
1301-
OrderDetails = new System.Collections.Generic.List<OrderDetail>();
1362+
Products = new System.Collections.Generic.List<OrderDetail>();
13021363
}
13031364
}
13041365

@@ -1350,7 +1411,11 @@ public class Region
13501411
public string RegionDescription { get; set; } // RegionDescription (length: 50)
13511412

13521413
// Reverse navigation
1353-
public virtual System.Collections.Generic.ICollection<Territory> Territories { get; set; } // Territories.FK_Territories_Region
1414+
1415+
/// <summary>
1416+
/// Child Territories where [Territories].[RegionID] point to this entity (FK_Territories_Region)
1417+
/// </summary>
1418+
public virtual System.Collections.Generic.ICollection<Territory> Territories { get; set; } = new System.Collections.Generic.List<Territory>(); // Territories.FK_Territories_Region
13541419

13551420
public Region()
13561421
{
@@ -1387,7 +1452,11 @@ public class Shipper
13871452
public string Phone { get; set; } // Phone (length: 24)
13881453

13891454
// Reverse navigation
1390-
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } // Orders.FK_Orders_Shippers
1455+
1456+
/// <summary>
1457+
/// Child Orders where [Orders].[ShipVia] point to this entity (FK_Orders_Shippers)
1458+
/// </summary>
1459+
public virtual System.Collections.Generic.ICollection<Order> Orders { get; set; } = new System.Collections.Generic.List<Order>(); // Orders.FK_Orders_Shippers
13911460

13921461
public Shipper()
13931462
{
@@ -1431,7 +1500,11 @@ public class Supplier
14311500
public string HomePage { get; set; } // HomePage (length: 1073741823)
14321501

14331502
// Reverse navigation
1434-
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } // Products.FK_Products_Suppliers
1503+
1504+
/// <summary>
1505+
/// Child Products where [Products].[SupplierID] point to this entity (FK_Products_Suppliers)
1506+
/// </summary>
1507+
public virtual System.Collections.Generic.ICollection<Product> Products { get; set; } = new System.Collections.Generic.List<Product>(); // Products.FK_Products_Suppliers
14351508

14361509
public Supplier()
14371510
{
@@ -1448,9 +1521,17 @@ public class Territory
14481521
public int RegionId { get; set; } // RegionID
14491522

14501523
// Reverse navigation
1451-
public virtual System.Collections.Generic.ICollection<Employee> Employees { get; set; } // Many to many mapping
1524+
1525+
/// <summary>
1526+
/// Child Employees (Many-to-Many) mapped by table [EmployeeTerritories]
1527+
/// </summary>
1528+
public virtual System.Collections.Generic.ICollection<Employee> Employees { get; set; } = new System.Collections.Generic.List<Employee>(); // Many to many mapping
14521529

14531530
// Foreign keys
1531+
1532+
/// <summary>
1533+
/// Parent Region pointed by [Territories].([RegionId]) (FK_Territories_Region)
1534+
/// </summary>
14541535
public virtual Region Region { get; set; } // FK_Territories_Region
14551536

14561537
public Territory()
@@ -1768,8 +1849,8 @@ public OrderDetailConfiguration(string schema)
17681849
Property(x => x.Discount).HasColumnName(@"Discount").HasColumnType("real").IsRequired();
17691850

17701851
// Foreign keys
1771-
HasRequired(a => a.Order).WithMany(b => b.OrderDetails).HasForeignKey(c => c.OrderId).WillCascadeOnDelete(false); // FK_Order_Details_Orders
1772-
HasRequired(a => a.Product).WithMany(b => b.OrderDetails).HasForeignKey(c => c.ProductId).WillCascadeOnDelete(false); // FK_Order_Details_Products
1852+
HasRequired(a => a.Details1).WithMany(b => b.Orders).HasForeignKey(c => c.OrderId).WillCascadeOnDelete(false); // FK_Order_Details_Orders
1853+
HasRequired(a => a.Details2).WithMany(b => b.Products).HasForeignKey(c => c.ProductId).WillCascadeOnDelete(false); // FK_Order_Details_Products
17731854
}
17741855
}
17751856

0 commit comments

Comments
 (0)