When I follow this walkthrough for External Content type

I am not able to register the ECT in SPD with the following error

This operation is based on a method with complex data types in its signature. To be supported, each complex type referenced in the method signature must have a default constructor that does not require any parameters. Update the .NET connectivity assembly code and redeploy it to the Business Connectivity Services before retrying."

Then I change the class IEnumerable for List class and it works I am able to see the ECT in SPD

what is the difference between them?


List implements IEnumerable interface. IEnumerable is an interface.

List is a class that defines a generic collection.

IEnumerable doesn't allow random access, where as List does allow random access using integral index.

In term of performance, iterating values from IEnumerable is much faster than iterating values from a List.

IEnumerable describes behavior, while List is an implementation of that behavior. When you use IEnumerable, you give the compiler a chance to defer work until later, possibly optimizing along the way. If you use ToList() you force the compiler to reify the results right away.

You faced this error because in case of IEnumerable, you need to add and implement its(the interface's) methods, chiefly the default constructor method. Whereas when you use List, it already has a default constructor. So, when you use List, you didn't face any issue.


SPD New External Content Type from existing .NET assembly error

IEnumerable vs List - What to Use? How do they work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.