public static ShareClassService CreateShareClassService(
            IEnumerable <TbPrimeShareClass> testData,
            ApplicationDbContext context)
        {
            context.TbPrimeShareClass.AddRangeAsync(testData);
            context.SaveChangesAsync();
            IAppRepository <TbPrimeShareClass> repository = new EfAppRepository <TbPrimeShareClass>(context);
            var service = new ShareClassService(repository);

            return(service);
        }
Esempio n. 2
0
 public ShareClassServiceTests()
 {
     this.testData = ShareClassTestData.GenerateShareClasses();
     this.service  = ShareClassTestData.CreateShareClassService(testData, base.context);
 }