public DeleteCommandHandler( IKanbanRepository repository, IKanbanAccessService accessService, MimirDbContext dbContext) : base(repository, accessService) { _dbContext = dbContext; }
public void SetUp() { var options = new DbContextOptionsBuilder <MimirDbContext>() .UseInMemoryDatabase("Mimir") .ConfigureWarnings(x => x.Ignore(InMemoryEventId.TransactionIgnoredWarning)) .Options; context = new MimirDbContext(options); //Seed users users = new[] { new AppUser { AuthID = "user1", Name = "User Uno", }, new AppUser { AuthID = "user2", Name = "User Duo", }, new AppUser { AuthID = "user3", Name = "User Trio", }, }; context.AppUsers.AddRange(users); context.SaveChanges(); }
public GetBoardDetailsQueryHandler(MimirDbContext dbContext, IQueryDispatcher queryDispatcher, IKanbanAccessService accessService) { _dbContext = dbContext; _queryDispatcher = queryDispatcher; _accessService = accessService; }
public KanbanAccessService(MimirDbContext dbContext, IHttpContextAccessor httpContextAccessor, IUserResolver userResolver) { _dbContext = dbContext; _httpContextAccessor = httpContextAccessor; _userResolver = userResolver; }
public GetQueryHandler(MimirDbContext dbContext, MapperConfiguration mapperConfiguration, IKanbanAccessService accessService) { _dbContext = dbContext; _mapperConfiguration = mapperConfiguration; _accessService = accessService; }
public KanbanStateQueryHandler(MimirDbContext dbContext, MapperConfiguration mapperConfiguration, IKanbanAccessService accessService) { _dbContext = dbContext; _accessService = accessService; _mapper = mapperConfiguration.CreateMapper(); }
public GetBoardBaseQueryHandler(MimirDbContext dbContext, IKanbanAccessService accessService) { _dbContext = dbContext; _accessService = accessService; }
public SearchNewBoardParticipantsQueryHandler(MimirDbContext dbContext) { _dbContext = dbContext; }
public UserRepository(MimirDbContext dbContext) { _dbContext = dbContext; }
public GetBoardsQueryHandler(MimirDbContext dbContext) { _dbContext = dbContext; }
public SqlKanbanRepository(MimirDbContext dbContext, IIndexableHelper indexableHelper) { _dbContext = dbContext; _indexableHelper = indexableHelper; }
public SearchBoardAssigneesQueryHandler(MimirDbContext dbContext) { _dbContext = dbContext; }
public EditBoardCommandHandler(MimirDbContext dbContext, IKanbanAccessService accessService) { _dbContext = dbContext; _accessService = accessService; }
public RemoveBoardCommandHandler(MimirDbContext dbContext) { _dbContext = dbContext; }
public void Setup() { var options = new DbContextOptionsBuilder <MimirDbContext>() .UseInMemoryDatabase("Mimir").Options; var indexableHelper = new IndexableHelper(); context = new MimirDbContext(options); repository = new SqlKanbanRepository(context, indexableHelper); #region Seed context var users = new[] { new AppUser { AuthID = "user1", Name = "User Uno", }, new AppUser { AuthID = "user2", Name = "User Duo", }, }; context.AppUsers.AddRange(users); context.SaveChanges(); var boards = new[] { new KanbanBoard { Name = "Board One", Description = "Description One", Owner = users[0], }, new KanbanBoard { Name = "Board Two", Description = "Description Two", Owner = users[1], } }; context.KanbanBoards.AddRange(boards); context.SaveChanges(); var columnsOne = new[] { new KanbanColumn { Index = 0, Name = "Board_0_col_0", Board = boards[0] }, new KanbanColumn { Index = 1, Name = "Board_0_col_1", Board = boards[0] }, new KanbanColumn { Index = 2, Name = "Board_0_col_2", Board = boards[0] }, }; var columnsTwo = new[] { new KanbanColumn { Index = 0, Name = "Board_1_col_0", Board = boards[1] }, new KanbanColumn { Index = 1, Name = "Board_1_col_1", Board = boards[1] }, new KanbanColumn { Index = 2, Name = "Board_1_col_2", Board = boards[1] }, }; context.KanbanColumns.AddRange(columnsOne); context.KanbanColumns.AddRange(columnsTwo); context.SaveChanges(); var itemsOne = new[] { new KanbanItem { Index = 0, Name = "B_0_Col_0_item_1", Column = columnsOne[0], }, new KanbanItem { Index = 1, Name = "B_0_Col_0_item_2", Column = columnsOne[0], }, new KanbanItem { Index = 2, Name = "B_0_Col_0_item_3", Column = columnsOne[0], }, new KanbanItem { Index = 0, Name = "B_0_Col_1_item_1", Column = columnsOne[1], }, new KanbanItem { Index = 1, Name = "B_0_Col_1_item_2", Column = columnsOne[1], }, new KanbanItem { Index = 2, Name = "B_0_Col_1_item_3", Column = columnsOne[1], }, new KanbanItem { Index = 0, Name = "B_1_Col_0_item_1", Column = columnsTwo[0], }, new KanbanItem { Index = 1, Name = "B_1_Col_0_item_2", Column = columnsTwo[0], }, new KanbanItem { Index = 2, Name = "B_1_Col_0_item_3", Column = columnsTwo[0], }, new KanbanItem { Index = 0, Name = "B_1_Col_1_item_1", Column = columnsTwo[1], }, new KanbanItem { Index = 1, Name = "B_1_Col_1_item_2", Column = columnsTwo[1], }, new KanbanItem { Index = 2, Name = "B_1_Col_1_item_3", Column = columnsTwo[1], }, }; context.KanbanItems.AddRange(itemsOne); context.SaveChanges(); #endregion }
public CreateBoardCommandHandler(MimirDbContext dbContext) { _dbContext = dbContext; }
public GetItemDetailsQueryHandler(IKanbanAccessService accessService, MimirDbContext dbContext, MapperConfiguration mapperFactory) { _accessService = accessService; _dbContext = dbContext; _mapperFactory = mapperFactory; }