EF4: The closed type 'xxxx' does not have a corresponding element settable property
I'm using this guide to call开发者_StackOverflow中文版 stored procedure in my projet which using EF4 EDMX through WCFDataservice.
I have mapped a complex type to return items from the stored procedure. If I call the method by http, the XML'result is perfect, but when I call with this code:
public void Test()
{
Uri methodUri = new Uri(entities.BaseUri + "/GetCase");
List<CaseFiltered> result = entities.Execute<CaseFiltered>(methodUri).ToList();
}
I get this exception The closed type CaseFiltered does not have a corresponding element settable property.
I had try this solution but it doesn't work for me.
Have you a solution?
Thank you!
Ok I find the solution according this article
Actually, you did everything right...However, our client library does not support materialization of a collection of complex types directly (yet). If you look at the output of the service op, you would see a list of tag, rather than an Atom Feed.
My workaround: I'm using Case entities, not the CaseFiltered complex type
精彩评论