views:

214

answers:

1

I've been playing with SubSonic lately and I've come across an interesting error.

Entity Models.Servers' has a property 'Columns' with an unsupported type

When I created a simple ASP.NET application with VS2008, added the reference to SubSonic, created the connection string, and dragged the Active Record files over into the project everything went well. I could compile. Then I added a Domain Service class and referenced the Models namespace and created a GetServers Method with the following code:

public IQueryable<Server> GetServers() { return Server.All() }

Again I compiled and NO problems. I thought great now I will create a Silverlight project and do the same thing. I created a hosted SilverLight project and did the same thing within the web project.

This time a compile resulted in the error above. I'm not sure what the difference between the two projects except maybe for the default References that are loaded.

Thoughts?

+2  A: 

This isn't an error thrown by SubSonic (which I think you know) and I'll guess that there's some kind of serialization happening here that doesn't like the interfaces we use. Either that or there's a namespace collision.

Rob Conery
The namespace defined in Settings.tt is LicenseMonitorServicesLibrary.Web.Models. This same namespace works with the stand-alone ASP.NET project
jdiaz
Also question http://stackoverflow.com/questions/1148553/ria-domainservice-activerecord is experiencing the same problem. I am also using ria-services
jdiaz
Wow! Based on you comment I removed System.Web.Ria from the project and compiled. This time I got the build to succeed. Wonder what the RIA guys are doing to cause the problem?
jdiaz
I messed around with the code some more and found that if I referenced the System.Web.Ria dll but removed the attribute [EnableClientAccess()] I could get the project to build
jdiaz