Closed
Description
I found this interface useful to create a extension method for seeding a DB context directly with builders.
e.g.
public static async Task<T> SaveAsync<T>(this IDbContext context, ITestDataBuilder<T> builder)
where T : class
{
var entity = builder.Build();
context.Set<T>().Add(entity);
await context.SaveAsync();
return entity;
}
It was in NTestDataBuilder
, however was removed for some reason in TestStack.Dossier
. The change wasn't listed in BREAKING_CHANGES.md
I'll raise a PR for this soon.
Metadata
Metadata
Assignees
Labels
No labels