Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Extensions Library for ADO.NET Entity Framework CTP5. Contains a set of utility classes providing additional functionality on top of Entity Framework CTP5, Code-First.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
References
RiaLib.Data.Tests
RiaLib.Data
Solution Items
.gitignore
EFExtensions.sln
EFExtensions.vsmdi
LICENSE.md
README.md

README.md

Entity Framework Extensions

The ADO.NET Entity Framework Extensions library contains a set of utility classes with additional functionality to Entity Framework CTP5.

The latest version is at: http://github.com/rialib/efextensions

NotifyIfModelOutOfSync

This class can be used to send you notification (or throw an exception) if model and database schema are out of sync.

DbDatabase.SetInitializer<DatabaseContext>(new NotifyIfModelOutOfSync<DatabaseContext>());

using (var db = new DatabaseContext())
{
    db.Users.Load();
}

TableSchemaConvention

This class can be used to make Entity Framework generate db schema for your models with respect to their parent namespace(s). For example if you have a model RiaLib.Data.Models.Membership.User then corresponding db table will be called [Membership].[User] instead of [dbo].[User].

public class DatabaseContext : DbContext
{
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Conventions.Add(new TableSchemaConvention());

        base.OnModelCreating(modelBuilder);
    }
}

Want to participate in this project?

Something went wrong with that request. Please try again.