Entity Framework Code First CTP4 is now available see following links:
- ADO.NET team blog - EF CTP4 Released!
- Microsoft ADO.NET Entity Framework Feature Community Technology Preview 4
- EF CTP4 Walkthrough: Productivity Improvements
- EF CTP4 Walkthrough: Code First
- Productivity Improvements for the Entity Framework
- Conventions for Code First
- Data Annotations in the Entity Framework and Code First
- EF CTP4 Tips & Tricks: Include with Lambda
And a quick note from my testing:
public class ProductCatalog : DbContext
{
public ProductCatalog()
{
this.Database.Connection.ConnectionString =
"Data Source=.;Initial Catalog=ProductCatalog;Integrated Security=True";
}
public DbSet<Category> Categories { get; set; }
public DbSet<Product> Products { get; set; }
}Above is from the first sample you create in VS2010 with EF Code First, and a quick way to create your DB on a different server than on localhost\SQLEXPRESS thought this is super cool.
No comments:
Post a Comment