Saturday, February 04, 2012

Sessions

Minimize
Self-Tracking Entities and Entity Framework 4
S3028
May 1, 2010 04:30 PM - 05:45 PM
Paul Salsbury, Paul Salsbury Consulting

N-tier solutions using Microsoft’s ORM, Entity Framework (EF), have been hard to implement across service boundaries, largely due to the difficulty of reporting changes to the EF’s ObjectContext.

EF 4 (released with .NET 4 & VS 2010) includes a Self-Tracking Entity Generator using T4 templates to create POCO classes that can be used to serialize/de-serialize objects (with change tracking).

A small LOB application’s data schema will be used to generate a model, the model will be slightly massaged in the designer, the T4 template will generate the POCO classes, architecting the solution into multiple projects will be reviewed, a self-hosted WCF service will be built, and a client demonstrated which shows an end to end N-Tier solution using Request-Reply operations.

Then, a disconnected and asynchronous SOA will be shown using One-Way operations (with MSMQ) between two (or more) databases. This requires the use of “business” keys to identify “aggregate root” entities.

C# extension methods, generic methods, and functional programming techniques are employed in the framework supporting the demonstrated N-Tier ORM based architecture.

  

Platinum Contributors

Minimize
  

Gold Contributors

Minimize
  

Silver Contributors

Minimize
  
Copyright 2007 by Toronto Code Camp