コード例 #1
0
        public AuthorCreationTest()
        {
            _factory = new ContextFactory();
            _factory.Initialize().Wait();
            _unitOfWork = _factory.Uow;

            _useCase = new CreateAuthorUseCase(_unitOfWork);
        }
コード例 #2
0
        public FindAuthorsTest()
        {
            _factory = new ContextFactory();
            _factory.Initialize();
            _unitOfWork = _factory.Uow;

            _useCase = new FindAuthorsUseCase(_unitOfWork);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 public FindAuthorsUseCase(ILibraryUoW uow) : base(uow)
 {
 }
コード例 #5
0
 public BusinessCoreGuid(ILibraryUoW uow, IRepositoryCore <TEntity, Guid> repository) : base(uow, repository)
 {
 }
コード例 #6
0
 protected UseCaseCore(ILibraryUoW uow)
 {
     UoW = uow;
 }
コード例 #7
0
 public BusinessCore(ILibraryUoW uow, IRepositoryCore <TEntity, TId> repository)
 {
     Uow        = uow;
     Repository = repository;
 }
コード例 #8
0
 public CreateAuthorUseCase(ILibraryUoW uow) : base(uow)
 {
 }