Phil Wright
Phil Wright

Reputation: 22946

Can you use the Entity Framework directly from Silverlight?

Every example I see of data access in Silverlight seems to be using the RIA Services to get hold of the entities from the back end. Is it possible to use the Entity Framework directly from Silverlight or is that impossible and hence the need to use RIA Services instead?

It would seem that using the Entity Framework directly from Silverlight against a SQL Azure database was a much more efficient and flexible way of handling data than going via the extra layer of RIA Services. What am I missing here?

Upvotes: 1

Views: 661

Answers (2)

Zied
Zied

Reputation: 1716

You can't use Entity Framework directly in Silverlight for the simple reason that you are working on the client side at runtime.

While using EF emphasis that you have access to your database which you should don't grant to a client-side runtime.

The best solution so far is to use the RIA Services which provide an intuitive and transparent way to manipulate your data and very similar to the EF.

Upvotes: 3

Josh
Josh

Reputation: 69272

No, Silverlight has no direct database access at the moment and I don't believe it's planned. You can use RIA services or plain old ADO.NET Data Services.

Upvotes: 4

Related Questions