mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
820 B
31 lines
820 B
using System.Threading.Tasks;
|
|
using Volo.Abp.DependencyInjection;
|
|
using Volo.Abp.Threading;
|
|
using Volo.Blogging.Blogs;
|
|
|
|
namespace Volo.Blogging
|
|
{
|
|
public class BloggingTestDataBuilder : ITransientDependency
|
|
{
|
|
private readonly BloggingTestData _testData;
|
|
private readonly IBlogRepository _blogRepository;
|
|
|
|
public BloggingTestDataBuilder(
|
|
BloggingTestData testData,
|
|
IBlogRepository blogRepository)
|
|
{
|
|
_testData = testData;
|
|
_blogRepository = blogRepository;
|
|
}
|
|
|
|
public void Build()
|
|
{
|
|
AsyncHelper.RunSync(BuildAsync);
|
|
}
|
|
|
|
public async Task BuildAsync()
|
|
{
|
|
await _blogRepository.InsertAsync(new Blog(_testData.Blog1Id, "The First Blog", "blog-1"));
|
|
}
|
|
}
|
|
}
|
|
|