Esempio n. 1
0
        public AuthorCreationTest()
        {
            _factory = new ContextFactory();
            _factory.Initialize().Wait();
            _unitOfWork = _factory.Uow;

            _useCase = new CreateAuthorUseCase(_unitOfWork);
        }
Esempio n. 2
0
        public FindAuthorsTest()
        {
            _factory = new ContextFactory();
            _factory.Initialize();
            _unitOfWork = _factory.Uow;

            _useCase = new FindAuthorsUseCase(_unitOfWork);
        }
        public ContextFactory()
        {
            DbContextOptionsBuilder <LibraryContext> builder = new DbContextOptionsBuilder <LibraryContext>();
            var context = new LibraryContext(builder.UseInMemoryDatabase().Options);

            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();
            Uow = new LibraryUoW(context);
            Initialize().Wait();
        }
Esempio n. 4
0
 public FindAuthorsUseCase(ILibraryUoW uow) : base(uow)
 {
 }
Esempio n. 5
0
 public BusinessCoreGuid(ILibraryUoW uow, IRepositoryCore <TEntity, Guid> repository) : base(uow, repository)
 {
 }
Esempio n. 6
0
 protected UseCaseCore(ILibraryUoW uow)
 {
     UoW = uow;
 }
Esempio n. 7
0
 public BusinessCore(ILibraryUoW uow, IRepositoryCore <TEntity, TId> repository)
 {
     Uow        = uow;
     Repository = repository;
 }
Esempio n. 8
0
 public CreateAuthorUseCase(ILibraryUoW uow) : base(uow)
 {
 }