I have a partial class Table1
which is generated by EF and I have created another partial class Table1
in the same namespace with the same name with some custom properties.
EF has created a parameterless constructor and I need to have one more constructor with some parameters in my custom partial class Table1
. But my code is complaining:
member names cannot be the same as their enclosing type
Is there a workaround for this?
The EF generated code for Table1
looks like:
public partial class Table1
{
public Table1()
{
this.something= new HashSet<something>();
}
}
And my custom code for partial class Table1
:
public partial class Table1
{
public void Table1(string test)
{
//do something
}
}