Skip to content

Library to create a temporary database that can be used for testing and then dropped once the tests are complete

License

Notifications You must be signed in to change notification settings

joshclark/TemporaryDb

Repository files navigation

TemporaryDb

This library can be used to create a temporary database that can be used for testing and then dropped once the tests are complete. Currently, only LocalDb is supported. The code attempts to connect to LocalDb on localhost.

Getting Started

Install the Nuget package and write the following code:

using System;
using TemporaryDb;

public class Program
{
    public static void Main(string[] args)
    {
		using (var db = new TempLocalDb("testdb"))
        {
           UseTheDatabase(db.ConnectionString);
        }
    }
}

Build status NuGet version

About

Library to create a temporary database that can be used for testing and then dropped once the tests are complete

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published