DD.WellWorkover.Cloud/AsbCloudWebApi.IntegrationTests/EFCoreExtensions.cs
2024-01-23 16:19:30 +05:00

14 lines
293 B
C#

using AsbCloudDb.Model;
namespace AsbCloudWebApi.IntegrationTests;
public static class EFCoreExtensions
{
public static void CleanupDbSet<T>(this IAsbCloudDbContext dbContext)
where T : class
{
var dbset = dbContext.Set<T>();
dbset.RemoveRange(dbset);
dbContext.SaveChanges();
}
}