OData ExceptionMessage The type 'Model.ViewModels.Refinement' cannot be configured as a ComplexType. It was previously configured as an EntityType.

Topics: ASP.NET Web API
Oct 5, 2012 at 6:47 PM

I just started playing with the OData [Queryable] attribute on some of my Web API endpoints, and I'm getting the following error:

ExceptionMessage=The type 'Model.ViewModels.Refinement' cannot be configured as a ComplexType. It was previously configured as an EntityType.
Parameter name: type

'Model.ViewModels.Refinement' is part of my EDMX EF data set. 

What do I need to do to allow it to be converted to a ComplexType?

Oct 5, 2012 at 6:52 PM

This is a known issue that was fixed. You can use our latest nightly build from myget to get the fix. more about how to get the nightly builds here 

http://blogs.msdn.com/b/henrikn/archive/2012/06/01/using-nightly-asp-net-web-stack-nuget-packages-with-vs-2012-rc.aspx

http://aspnetwebstack.codeplex.com/discussions/353867

Oct 5, 2012 at 7:09 PM

Yep, that did it!  Thanks!