public async Task GetTextsFromDb() { await _store.AddAsync(new TextEntity("Simple text.")); var result = await _store.GetAllAsync(); Assert.IsTrue(result.Any()); }
public async Task <IEnumerable <TextDto> > Handle(GetAllTextsQuery request, CancellationToken cancellationToken) { try { var texts = await _store.GetAllAsync(); return(texts); } catch (Exception e) { throw new Exception(e.Message); } }