{"id":26426196,"url":"https://github.com/mjebrahimi/sqlinmemory","last_synced_at":"2025-03-18T03:22:48.048Z","repository":{"id":40376762,"uuid":"245518675","full_name":"mjebrahimi/SqlInMemory","owner":"mjebrahimi","description":"SqlInMemory is a library for creating SqlServer database on Memory instead of hard disk, at last Drops and Disposes database when you're done with it. This is useful for Integration Testing.","archived":false,"fork":false,"pushed_at":"2023-03-02T01:57:21.000Z","size":77,"stargazers_count":33,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T16:06:41.972Z","etag":null,"topics":["inmemory","inmemory-db","inmemory-test","integration-testing","sqlserver","unit-test","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjebrahimi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-06T21:20:06.000Z","updated_at":"2025-01-23T12:23:04.000Z","dependencies_parsed_at":"2023-01-29T20:16:02.692Z","dependency_job_id":null,"html_url":"https://github.com/mjebrahimi/SqlInMemory","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjebrahimi%2FSqlInMemory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjebrahimi%2FSqlInMemory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjebrahimi%2FSqlInMemory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjebrahimi%2FSqlInMemory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjebrahimi","download_url":"https://codeload.github.com/mjebrahimi/SqlInMemory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244147827,"owners_count":20406065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["inmemory","inmemory-db","inmemory-test","integration-testing","sqlserver","unit-test","unit-testing"],"created_at":"2025-03-18T03:22:47.310Z","updated_at":"2025-03-18T03:22:48.042Z","avatar_url":"https://github.com/mjebrahimi.png","language":"C#","readme":"[![NuGet](https://img.shields.io/nuget/v/SqlInMemory.svg)](https://www.nuget.org/packages/SqlInMemory/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/mjebrahimi/SqlInMemory/workflows/.NET%20Core/badge.svg)](https://github.com/mjebrahimi/SqlInMemory)\n\n\n# SqlInMemory\n\n**SqlInMemory** is a library for creating SqlServer database on **Memory** instead of hard disk, at last **Drops and Disposes** database when you're done with it. This is useful for **Integration Testing**.\n\n**Note : This library uses [RamDisk](https://github.com/mjebrahimi/RamDisk) which also uses [ImDisk](http://www.ltr-data.se/opencode.html/#ImDisk) in the backend for creating virtual disk drive. Therefore you have to install imdisk first. ([Download link of current stable version 2.0.10](http://www.ltr-data.se/files/imdiskinst.exe))**\n\n## Get Started\n\n### 1. Install Package\n\n```\nPM\u003e Install-Package SqlInMemory\n```\n\n### 2. Use it\n\nPass your connection string and it will create (mount) a virtual disk drive 'Z' and create database there finaly when disposed, drop database and unmount drive.\n\n```csharp\nvar connectionString = \"Data Source=.;Initial Catalog=TestDb;Integrated Security=true\";\nusing (SqlInMemoryDb.Create(connectionString))\n{\n    //Use database using ADO.NET or ORM\n\n    //For example using EF Core\n    services.AddDbContext\u003cAppDbContext\u003e(opt =\u003e opt.UseSqlServer(connectionString));\n    var serviceProvider = services.BuildServiceProvider();\n    var appDbContext = serviceProvider.GetService\u003cAppDbContext\u003e();\n    appDbContext.Database.Migrate();\n    //...\n}\n```\n\n## Contributing\n\nCreate an [issue](https://github.com/mjebrahimi/SqlInMemory/issues/new) if you find a BUG or have a Suggestion or Question. If you want to develop this project, Fork on GitHub and Develop it and send Pull Request.\n\nA **HUGE THANKS** for your help.\n\n## License\n\nSqlInMemory is Copyright © 2020 [Mohammd Javad Ebrahimi](https://github.com/mjebrahimi) under the [MIT License](https://github.com/mjebrahimi/SqlInMemory/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjebrahimi%2Fsqlinmemory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjebrahimi%2Fsqlinmemory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjebrahimi%2Fsqlinmemory/lists"}