Пример #1
0
 public async Task <IEnumerable <AccountCategoryIndexView> > Handle(GetAccountCategoryIndexListQuery request, CancellationToken cancellationToken)
 {
     return(await _database.AccountCatagory
            .Select(AccountCategoryIndexView.Projection)
            .Where(a => a.Name.Contains(request.SearchString))
            .ToListAsync());
 }
        public async Task <ActionResult <IEnumerable <AccountCategoryIndexView> > > GetAccountCategoryIndexs([FromQuery] GetAccountCategoryIndexListQuery query)
        {
            var categoryIndex = await _Mediator.Send(query);

            return(Ok(categoryIndex));
        }