Programming Entity Framework by Lerman Julia

Programming Entity Framework by Lerman Julia

Author:Lerman, Julia [Lerman, Julia]
Language: eng
Format: mobi
Tags: COMPUTERS / Programming Languages / C#
Publisher: OReilly Media - A
Published: 2010-08-08T22:00:00+00:00


* * *

The WCF RIA Services landing page on the official Silverlight website is a great place to get started with this technology.

Summary

The most daunting challenges you’ll face when you work across tiers of a distributed application is that although EntityObjects are serialized, the ObjectStateEntry objects that contain the change tracking information are not. This leaves you with no state information when your object reaches its destination. In the WCF service example in this chapter, you solved this problem by explicitly changing the EntityState of objects prior to calling SaveChanges. This is one pattern for overcoming this problem, and you will learn more in later chapters.

WCF Data Services was built on top of Entity Framework and it provides a smooth, though sometimes simplistic, way to expose your data directly for consumption through HTTP. It certainly reduces the challenge for consumers who want to work with your data, but it may not be the answer for big enterprise applications. WCF RIA Services, which began as an attempt to make data consumption simpler in Silverlight applications, provides a different perspective on simplifying the creation and consumption of WCF services in .NET and it has great support for Entity Framework as a data layer.

In the next chapter, we’ll look at using POCOs in services, which changes the game significantly for creating services using the Entity Framework. Some developers will prefer leveraging the default EntityObjects in their applications, while others will prefer the simpler objects. Either way, when it comes to developing custom WCF services you will find that some of the challenges we faced earlier in this chapter are greatly reduced when using POCOs.

Web services and WCF are big topics unto themselves, and wonderful books are devoted solely to these technologies. The samples in this chapter provided some patterns that will be great for many scenarios, but not all. Later in this book you will learn more patterns, but more importantly, throughout the book you will gain the knowledge to achieve whatever architecture you choose for your service-based applications.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.