forked from ddrilling/AsbCloudServer
14 lines
293 B
C#
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();
|
||
|
}
|
||
|
}
|