开发者

Silverlight and Entity Framework

is is possible 开发者_运维技巧to use full Entity Framework 4+ in Silverlight? I use it with WPF, but is there any difference when using Silverlight?

Thank you!


Not on a client side. In Silverlight world client talks to server via WCF services. Then, server side can use anything you want and EF perfectly fine.

RIA, MVVM and such are just "gluing" techniques that allow you to use WCF in most easy way on client side.


The short answer to your question is No, your Silverlight app is a client app and is abstracted from your server side just like an aspx page is until its gets posted back to the server. You need to use a service to access data / EF on the server. There are a number of patterns to consider when doing this, I suggest you read up a bit before jumping in. If you expected it would be quick to convert a WPF app to Silverlight I would suggest you slowdown a bit and read up about it (I didn't, and I should have). If your WPF app used services (which I assume it doesn't as you seem to be using EF in the WPF app) it would have been much easier to share the code but there are a number of things to consider, its way more than just sharing xaml views. With Silverlight finding a good pattern for your application is essential, and MS has lots of it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜