Support constructors?
I have this model
class Foo
{
public Foo(int prop)
{
Prop = prop;
}
public int Prop {get;}
public string Str {get;set;}
}
the generated method calls a default constructor which does not exist
P.S. If it is OK, I could try to prepare a PR for this issue. This issue does not sound impossible
Yeah a PR would be more than welcome. I think it's not impossible, but a bit more difficult to implement than current features. Although, what if the logic in the constructor was more than just setting a property and required some calculation on the input argument?
@mostmand I think we need to check names of the constructor parameters. If all parameters match property names everything is fine. If not, copying cannot be implemented (or a method Copy will accept unresolved parameters)
Does something like this sound good?