Monday, November 30, 2009

Entity Framework 4.0 - Foreign Key Relationships

The current version of EF (v3.5) maps table relationships as properties, hiding database foreign-key columns. However, there are some scenarios where you don’t need the entire referenced object to do some operation, you only need its “Id” (foreign key).

For example, in a web application it is very common to use combo-boxes in order to assign relationships. In these scenarios, after a post-back it is necessary to re-create the model and its relationships (using combo-boxes “selected values”). Since you don’t have the referenced objects, you must get them from the database or use “Stub Entities” to simulate them.

To solve this problem, the version 4.0 will also allow you to map foreign-key columns as properties, making it easier.

More info: http://blogs.msdn.com/adonet/archive/2009/11/06/foreign-key-relationships-in-the-entity-framework.aspx.

Thursday, November 26, 2009

WF Course

Last week I was teaching a three days course about WF (Windows Workflow Foundation).

The content was the following:

Day OneWF
Introduction
Parameters
Conditions
Persistence
WebServices
LocalServices

Day Two
Errors
FaultHandlers
Transactions
Compensation
Compensation + Transaction

Day Three
Parallel Execution
WCF
Tracking
Custom Activities
WF v4 Overview
Questions

 

Here you can download the presentation (in Spanish).

And here is the code: DayOne, DayTwo and DayThree.