I have a class "MyEntity", which does not have a default constructor (well, it does, yet it is not suitable for use).
I have a form with a DataGrid, which has a cool feature for creating new rows.
Problem: DataGrid cannot create new object when no parameterless constructor is defined.
Question: is there a way to provide the DataGrid with a Func that would construct the new object (= some factory method like CreateObject)? Or is there some other solution?
PS Adding a default constructor is not an option - it is not suitable for my purposes. POCO in EF4 requires objects to be created through a context factory class (calling CreateObject).