Skip to content
| Marketplace
Sign in
Visual Studio>Templates>ADO.NET Unit Testable Repository Generator
ADO.NET Unit Testable Repository Generator

ADO.NET Unit Testable Repository Generator

Johannes Hoppe

|
10,316 installs
| (4) | Free
Generates a strongly-typed Object Context and POCO Entities from your EDMX file. Additionally a Repository and an abstract Unit Test for the Repository is created (with a mock for the ObjectContext and mock for the ObjectSets). The "ADO.NET C# POCO Entity Generator" was origi...
Download

Generates a strongly-typed Object Context and POCO Entities from your EDMX file. Additionally a Repository and an abstract Unit Test for the Repository is created (with a mock for the ObjectContext and mock for the ObjectSets).

The "ADO.NET C# POCO Entity Generator" was originally developed by Microsoft.
It was forked by Rab Hallett under the name "ADO.NET Mocking Context Generator" (blogofrab.blogspot.com).

This extension is a new fork by Johannes Hoppe.

 

With this download you will get a complete solution:

  • all functionalities of the ADO.NET C# POCO Entity Generator, which includes:
    • a compatible ObjectContext (replaces the “Entities-Class”)
    • all entity types as POCOs (Plain Old CLR Objects)
  • as well as:
    • an Interface for the ObjectContext
    • a mock of the ObjectContext (provides access to ObjectSets)
    • a mock that implements IObjectSet (stores data)
    • a partial Repository class
    • an abstract Unit Test class
    • optional: support for Microsoft Unity *
    • optional: equality members for the POCOs (Equals and GetHashCode) **

 

Get startet now:
http://blog.johanneshoppe.de/2010/10/ado-net-unit-testable-repository-generator/

Read the walkthrough:
http://blog.johanneshoppe.de/2010/10/walkthrough-ado-net-unit-testable-repository-generator/

Get some more information about Unit Testing:
http://blog.johanneshoppe.de/2010/11/unit-testing-in-detail/

Download the demo solution:
http://lecture-hoppe.googlecode.com/files/WebNoteMvc_v0.5.zip

 

Study the source code:
http://repositorygenerator.codeplex.com/

 

* Use the preprocessor definition “DO_NOT_USE_UNITY”, if you do not want to utilize the Unity-Framework.
** Some people might prefer the POCOs completely plain. For that case you should define the directive “DO_NOT_INCLUDE_ EQUALITY_MEMBERS”.

 

-----------------------------------------------------------------

Changelog:

v0.2 - first public version
v0.3 - added equality members
v0.4 - small bugfixes
v.05 - rename from "ADO.NET Mocking Context Generator - Extended" to "ADO.NET Unit Testable Repository Generator"

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft