Skip to content

Entity Framework Repository

Michael Altmann edited this page Sep 21, 2016 · 7 revisions

Description

This extension is a repository for CherrySeed which uses Entity Framework as O/R mapping framework.

Installation

Entity Framework Repository can be installed via NuGet.

How To Use It

This code block initiates an instance of EfRepository and sets this repository globally. You have to pass a delegate via constructor which creates a DbContext. For more info see Setting Global Repository and Setting Entity Specific Repository.

var efRepository = new EfRepository(() => new ApplicationDbContext());

var config = new CherrySeedConfiguration(cfg =>
{
    ...
    cfg.WithRepository(efRepository);
    ...
});

Changelog

v1.0.1

  • Initial version

Clone this wiki locally