Beispiel #1
0
 public static IRepository <T> GetRepository <T>(this BlogTestBase blogTest)
     where T : Entity
 {
     return(blogTest.ServiceProvider.GetRequiredService <IRepository <T> >());
 }
Beispiel #2
0
 public static T GetDomainService <T>(this BlogTestBase blogTest)
     where T : IDomainService
 {
     return(blogTest.ServiceProvider.GetRequiredService <T>());
 }
Beispiel #3
0
 public static void InitDb(this BlogTestBase blogTest)
 {
     blogTest.AddTestDbContext <BlogDbContext>();
     BlogDbInitializer.Initialize(blogTest.DbContext as BlogDbContext);
 }