{"id":22065786,"url":"https://github.com/karenpayneoregon/entityframeworkcoreinmemorytesting","last_synced_at":"2026-05-09T00:38:31.383Z","repository":{"id":38058784,"uuid":"203244664","full_name":"karenpayneoregon/EntityFrameworkCoreInMemoryTesting","owner":"karenpayneoregon","description":"Examples for InMemory testing with EF Core","archived":false,"fork":false,"pushed_at":"2022-12-27T15:02:09.000Z","size":281,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"Version2021","last_synced_at":"2025-03-23T18:17:26.137Z","etag":null,"topics":["csharp","dependency-injection","efcore","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karenpayneoregon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-19T20:21:46.000Z","updated_at":"2024-06-11T18:40:01.000Z","dependencies_parsed_at":"2023-01-31T04:02:00.166Z","dependency_job_id":null,"html_url":"https://github.com/karenpayneoregon/EntityFrameworkCoreInMemoryTesting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/karenpayneoregon/EntityFrameworkCoreInMemoryTesting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FEntityFrameworkCoreInMemoryTesting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FEntityFrameworkCoreInMemoryTesting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FEntityFrameworkCoreInMemoryTesting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FEntityFrameworkCoreInMemoryTesting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karenpayneoregon","download_url":"https://codeload.github.com/karenpayneoregon/EntityFrameworkCoreInMemoryTesting/tar.gz/refs/heads/Version2021","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2FEntityFrameworkCoreInMemoryTesting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32803622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csharp","dependency-injection","efcore","unit-testing"],"created_at":"2024-11-30T19:22:00.343Z","updated_at":"2026-05-09T00:38:31.378Z","avatar_url":"https://github.com/karenpayneoregon.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Entity Framework Core 2x InMemory unit testng for windows forms\n\n:green_circle: Code samples showing basics of in memory unit testing\n\n# Solution structure\n\nThere was a mishap when performing an experiment which messed up where several projects got created. Even so, all code works as expected. To fix the folder structure would require more work than any benefits so the folder structure remains as is.\n\n### Dependency injection\nWhile in `ASP.NET` in memory test is rather easy as dependency injection is done in Startup.cs in ConfigureServices there is no configure service event in windows forms so developers must using a library such as [Simple Injector](https://simpleinjector.readthedocs.io/en/latest/index.html) to setup dependence injection as done in SimpleInjectorWindowsForms1 windows form project.\n\nSimple Injector was picked from a handfull of open source libaries which means if a developer has a go to dependence injection library then replace Simple Injector with that one.\n\n### Unit test\nAll unit test use [InMemory data provider](https://docs.microsoft.com/en-us/ef/core/providers/in-memory/). `SqlLite` is used in several examples.\n\n### Important\nEF�s in-memory database `isn�t a relational database` so it does not `enforce constaints` that a real database would.\n\nA bit slower and more work to setup but is a real database consider SQLLite In-Memory.\n\n# Tidbits\n\n[How can I reset an EF7 InMemory provider between unit tests?](https://stackoverflow.com/questions/33490696/how-can-i-reset-an-ef7-inmemory-provider-between-unit-tests)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fentityframeworkcoreinmemorytesting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarenpayneoregon%2Fentityframeworkcoreinmemorytesting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fentityframeworkcoreinmemorytesting/lists"}