Linq Challange: HR Sample Model

time to read 1 min | 164 words

Okay, here is an interesting challange spurred by a a comment Alex has left on my previous post about linq.

Given this model, how would you build it using Linq for SQL (is it possible?) and Linq for Entities? I don't really care about the table layout (in other words, feel free to build something that can make your life easier), only that the model will be able to express the required complexity cleanly. A couple of notes, this is a temporal model, which include most of the usual database semantics (1:M, N:M, M:1).

The two gotchas for the OR/M implementation is that Rule is an abstract class that has several implementations, and that a rule is always attached to an entity (which may be of several urelated type Contract/Employee/Department, etc).

I would be interested to see how both Linq implementations handle this task...

Any takers?