コード例 #1
0
        public async Task GetTextsFromDb()
        {
            await _store.AddAsync(new TextEntity("Simple text."));

            var result = await _store.GetAllAsync();

            Assert.IsTrue(result.Any());
        }
コード例 #2
0
            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);
                }
            }