-
Notifications
You must be signed in to change notification settings - Fork 55
Home
There are the only two (2) requirements to bootstrap your app and integrate with the framework.
- 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. - Your
DbContext
is required to inherit from DataContext. Note: we use the EF Power Tools and modified the T4 templates so when the DbContext is generated it already inheritsDataContext
. - 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.
- 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.cs.
- Review integration test e.g. CustomerRepositoryTests.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 CustomerController.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 anHttpRequest
, 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.
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)
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 Facade)
Adding Custom Queries to (Extending the) Repository
Encapsulating Query Logic with the Query Object Pattern (Reusable Queries)
Invoking Stored Procedures with Service Pattern Examples
Generic Unit of Work & Extensible Repository in ASP.NET MVC & Entity Framework
Generic Unit of Work and Repository Introduction & Overview
The Official URF Team | Docs: goo.gl/6zh9zp | Subscribe to URF Updates: @lelong37 | Blog: blog.longle.io