using System; using Volo.Blogging.EntityFrameworkCore; namespace Volo.Blogging { public abstract class BloggingApplicationTestBase : BloggingTestBase { protected virtual void UsingDbContext(Action action) { using (var dbContext = GetRequiredService()) { action.Invoke(dbContext); } } protected virtual T UsingDbContext(Func action) { using (var dbContext = GetRequiredService()) { return action.Invoke(dbContext); } } } }