开发者

why Silverlight 4 uses WCF RIA service for Entity Framework?

开发者 https://www.devze.com 2023-01-26 07:35 出处:网络
I want to u开发者_Python百科se Entity framework in silverlight , But with out RIA service . Is there any way ?

I want to u开发者_Python百科se Entity framework in silverlight , But with out RIA service .

Is there any way ?

If WCF RIA is mandatory than why so ?


Silverlight is a client side runtime (Code is not executed on the server). And therefore you cannot use Entity Framework to call a DB directly from it. RIA Services essentially create a web service layer that Silverlight can talk to. On the client side proxy classes are created to interact with the service layer. RIA Data Services is designed to make it appear as if you are interrogating EF directly.

To use EF without RIA services you can create a basic service class and have all your business logic in it, and from within this service you can use Entity Framework. You would make calls to this service layer just like any other service.

0

精彩评论

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