5 public class BaseContext
9 public class MyDataContext : BaseContext
13 public abstract class Entity<T>
17 public class Person : Entity<MyDataContext>
21 public sealed class TheBox<T> where T : BaseContext
23 public U GetById<U> (Guid entityId) where U : Entity<T>
31 public static void Main ()
33 TheBox<MyDataContext> dc = new TheBox<MyDataContext> ();
34 dc.GetById<Person> (Guid.NewGuid ());