16 lines
385 B
C#
16 lines
385 B
C#
using Persistence.Database;
|
|
using Persistence.Database.Model;
|
|
|
|
namespace Persistence.IntegrationTests.Extensions;
|
|
|
|
public static class EFCoreExtensions
|
|
{
|
|
public static void CleanupDbSet<T>(this PersistenceDbContext dbContext)
|
|
where T : class
|
|
{
|
|
var dbset = dbContext.Set<T>();
|
|
dbset.RemoveRange(dbset);
|
|
dbContext.SaveChanges();
|
|
}
|
|
}
|