This is a migrated thread and some comments may be shown as answers.

No parameterless constructor defined for this object

1 Answer 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ahmet
Top achievements
Rank 1
Ahmet asked on 27 Jun 2016, 09:47 AM

Hi,

 

ObjectDataSource business.Component not connection 

 

Error !

No parameterless constructor defined for this object

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 27 Jun 2016, 03:20 PM
Hello Ahmet,

In general, the purpose of the ObjectDataSource component is to provide data to the report in a declarative manner. The ObjectDataSource.DataSource should be the assembly qualified name or Type of the data access layer (class), where the reporting engine will use System.Reflection to create the instance of the class (by using its default constructor) and to execute its method specified by the ObjectDataSource.DataMember.

Having the above into account, the data access layer must have a default parameterless constructor in order to be instantiated.


In case it is a data model created via Entity Framework, please consider switching to the EntityDataSource component.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ahmet
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or