Skip to content

Cosmo801/MockDatabase

Repository files navigation

MockDatabase

This project is a mocker for creating test data for your project during the development stage. The goal of the project is to have as little burden on the client as possible, they need to merely define a MockContext concrete class and define their entities as MockCollection on that

See the wiki for more a more detailed usage guide.

Quickstart

Define a MockContext concrete class (Cosmo.MockDatabase.Context namespace)

Create a property for each entity you want as a MockCollection (Cosmo.MockDatabase.Context namespace)

This process is analogous to defining a DbContext using EntityFramework

Use the fluent API to build the database

Main

using Cosmo.MockDatabase.Builders

MockContextBuilder<TContext> builder = new MockContextBuilder<TContext>();

TContext data = builder.BuildDatabase();

DependencyInjection

IServiceCollection.AddMockDatabaseDb();

Nuget Packages

Cosmo.MockDatabase

Cosmo.MockDatabase.Core

About

Mocker for creating test data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages