Here are the only two (2) requirements to bootstrap your app and integrate with the framework.

  1. All entities are required to implement IObjectState, we've done this through implementing a base entity class (Entity.cs) which are entities inherit (e.g. Customer.cs).
    Note: we use the EF Power Tools from EF Team, and modified the T4 templates to generate our entities to inherit Entity.cs.
  2. Your DbContext is required to inherit from DataContext.cs.
    Note: we use the EF Power Tools and modified the T4 templates so when the DbContext is generated it already inherits DataContext.
  3. It is recommended you download source code and projects and include them directly into your solution so you can make changes as they are needed for your use cases, after all the framework is extremely lightweight, designed to have a very small footprint and has less than 10 classes.

Optional (recommended) Readings

  • Download the source code, (IMPORTANT:) compile and run all the unit and integration tests, almost all implementation questions can be answered by reviewing them e.g. CustomerRepositoryTests.
  • Review integration test e.g. CustomerRepositoryTest.cs, this is the most comprehensive tests and will run against a database, which illustrates most of the core features of the framework. If time permits review the other integration tests as well, this shouldn't take more than 15 minutes.
  • Review CustomerControllers.cs, this illustrates how to leverage the framework in ASP.NET MVC for all typical CRUD like activity.
  • Review UnityConfig.cs, this illustrates DI/IoC configuration of the framework, most importantly Singleton like behavior that the IDataContext that is bound to the lifecycle of an HttpRequest, this is needed regardless of which brand or type of DI/IoC framework you are using.
  • Leverage the lightweight documentation (below), the documentation is indeed very lightweight and that is deliberate, as is the framework as well. The (non-intimidating) framework has an extremely small footprint - 10 total classes, which includes the Entity Framework provider, with this being said a the framework should also only have lightweight set of documentation that is easy, fast to read and understand.

Documentation

v3.3 (docs updated - 12/2/2014)
Adding Custom Repositories
Repeatable Integration Tests with Northwind Test Db & Seed Data
Using Framework in ASP.NET MVC 5 with EF, AngularJS & Kendo UI
Find Object by Primary Key(s)
Inserting & Update (Upsert) / CRUD with a Complex Object Graph with Different States
Deep Loading a Complex Object Graph
Performing Async Selects with Includes and Sorting
Object Graph State(s) while Disconnected or Between different DataContext(s)
Query Against Entity Framework or IQueryable Directly
ASP Identity Integration (thanks to Neilski)


v3.2 (docs updated - 9/23/2014)
Quick CRUD Samples in LINQPad
Transactions, Scope, Commits and Rollbacks
Quick Setup in ASP.NET MVC 5 (Video) Walkthrough
ASP.NET MVC Controller & DI/IoC (DbContext Singleton Behavior Registration)
Services Pattern Example (Business Layer Fascade)
Adding Custom Queries to (Extending the) Repository
Encapsulating Query Logic with the Query Object Pattern (Reusable Queries)
Invoking Stored Procedures with Service Pattern Examples

v2.x (docs updated - 3/12/2014)
Generic Unit of Work & Extensible Repository in ASP.NET MVC & Entity Framework

v1.x (docs updated - 1/7/2014)
Generic Unit of Work and Repository Introduction & Overview

We have rich discussion and issues forums, 9 times out of 10, most of the questions we receive have already been answered in our discussion/issues forums. If not, start a discussion up, we and/or the community will help. Worse case scenario if question(s), issue(s), or implementation needs Live support, we offer this through Codementor. This should be a last resort, again because the framework is meant to be easily integrated and consumed. This is an option because we have ran into teams that need live assistance, customization, quick bootstrappiing, guidance with architecture or simply have requirements (e.g. enterprise teams) to use a framework that has support.

Guidance and/or Support
Discussions
Issues
Subscribe to Updates


Need another data provider? Implement the interfaces in the Repository.Pattern project! Ideas, features, bugs, or any other contributions? Simply do a pull request and we'll consider making part of the official release.

Last edited Nov 18, 2015 at 10:58 PM by lelong37, version 236