JonPSmith / EfCore.TestSupport

Tools for helping in unit testing applications that use Entity Framework Core
https://www.thereformedprogrammer.net/new-features-for-unit-testing-your-entity-framework-core-5-code/
Other
352 stars 53 forks source link

Request: Create a separate respository / NuGet package for SeedDatabase feature #46

Closed selangley-wa closed 2 years ago

selangley-wa commented 3 years ago

After coming across your article:

Getting better data for unit testing your EF Core applications

I was looking forward to using your “Seed from Production” feature for EF Core 5.0 tests. But alas, you decided to leave that feature behind in EFCore.TestSupport v3.2.0.

Would it be possible to move that feature into a separate repository and NuGet package so that I could use that feature together with EfCoreTestSupport v5.0.0?

Thanks.

By the way, I found the first version of you book so helpful that I went and bought the 2nd versions as well.

JonPSmith commented 3 years ago

Hi @selangley-wa,

Sorry about that, but only a few people were using it so I took this feature out. The good news is that the code can be found in branch Version3-2-0 and it its own directory, SeedDatabase. You should be able to extract that code quite easily.

PS. Glad you found my book useful. The second edition has a lot more in it because I have been using EF Core on client applications for a couple of years.

selangley-wa commented 3 years ago

Thanks.

Yes, I was able to extract that feature from the earlier version. But if you were to host it as a separate project, it would make it easier for others to use and it could receive feedback, pull requests, and perhaps be more visible for people to find, as well.

JonPSmith commented 3 years ago

Hi @selangley-wa,

I have about 15 active NuGet packages and keeping them up to date can be a big job, especially when a new version of .NET/EF Core comes out. That is one reason I removed some features from EfCore.TestSupport version 5.

If you want to create a repo/NuGet package I will advertise it. If you do please leave the headers on the files I created, but of course any new classes should have your name.

JonPSmith commented 2 years ago

Someone left a comment about this feature so I have reopened this issue. I will add this feature back into the main EfCore.TestSupport code the next time I update this library.

JonPSmith commented 2 years ago

I have released a prerelease version of this library called 6.0.0-preview001 that is updated to NET6-rc.2. This version also has the “Seed from Production” feature added back in.