Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juristr/dbcontext-utils
Entity Framework DBContext utilities
https://github.com/juristr/dbcontext-utils
Last synced: about 1 month ago
JSON representation
Entity Framework DBContext utilities
- Host: GitHub
- URL: https://github.com/juristr/dbcontext-utils
- Owner: juristr
- Created: 2012-10-01T07:01:37.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-11-08T16:54:14.000Z (about 12 years ago)
- Last Synced: 2024-04-14T22:28:04.260Z (7 months ago)
- Language: C#
- Size: 355 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
dbcontext-utils
===============
This repo is intended to contain a collection utilities for the Entity Framework's DbContext.# Usage
In order to use the DbContextUtils you have to adapt your Entity Framework connection. For this to happen, you have to register the `DbContextConnectionAdapter` as follows:public partial class Entities : DbContext
{
public Entities()
: base(new DbContextConnectionAdapter(System.Reflection.Assembly.GetExecutingAssembly()).AdaptConnection("name=Entities"))
{
//...
}
}## Schema Translations
Once the `DbContextConnectionAdapter` has been registered you can configure your schema translations as described in [one of my blog posts](http://juristr.com/blog/2012/07/entity-framework-schema-translations/).# Credits
Large parts of the code have been taken from [Entity Framework Runtime Model Adapter project](http://efmodeladapter.codeplex.com/) on Codeplex.