Not Just a Designer: Code First in Entity Framework: Listing 2.
Using the Code First Fluent API.
protected override void OnModelCreating(DbModelBuilder DbmodelBuilder)
Property(c => c.CompanyName).
Property(e => e.FirstName).
Property(e => e.LastName).
Gil Fink, Microsoft MVP, is an expert in Web development and Microsoft data platforms. He works as a senior .NET consultant and architect at Sela Group. He's currently consulting for various enterprises, where he architects and develops Web- and rich Internet application-based solutions. He conducts lectures and workshops for developers and enterprises who want to specialize in infrastructure and Web development. You can read his publications at his blog.