views:

192

answers:

1

I have this problem for 2 months now

How can I use stored procedures whith RIA.

I was using LinqToSql and everithing works fine.

I've made an class in designer and mapped it to a SP.

Now in EF I saw this ComplexTypes I've imported son SP with result in ComplexTypes.

But in DomainDataSource are not appear.

OK.

But how can I use them ?

I need only to retreive some data.

I've tried all solutions (List, IList, etc.) but I get

Unable to cast object of type 'System.Data.Metadata.Edm.ComplexType' to type 'System.Data.Metadata.Edm.EntityType'. BusinessApplication2

Any solutions please ?

+1  A: 

The problem with stored procedures is that the RIA services tools cannot "see" which columns the stored procedure will return.

Therefore, there is a lot of code that is missing that would otherwise be generated.

Not the answer you are looking for but the solution is to not use stored proceedures.

Shiraz Bhaiji