The idea was for you not to create the contructor, but for you to use the InitializePartial function to do your initialisation.
For example, taking Northind database, and setting
For example, taking Northind database, and setting
MakeClassesPartial = true;
This creates a class with the following:[GeneratedCodeAttribute("EF.Reverse.POCO.Generator", "2.13.0.0")]
public partial class Order
{
public int OrderId { get; set; } // OrderID (Primary key)
...blah blah blah...
public Order()
{
Freight = 0m;
OrderDetails = new List<OrderDetail>();
InitializePartial();
}
partial void InitializePartial();
}
You create a class you want to override, say Order, with the following:public partial class Order
{
partial void InitializePartial()
{
// todo. Put your stuff in here.
Freight = 12345.67m;
ShipName = "demo";
OrderDetails = null;
// etc...
}
}