简体   繁体   中英

why Silverlight 4 uses WCF RIA service for Entity Framework?

I want to use 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM