public async Task <List <CourseTitleViewModel> > Handle(GetCourseTitlesQuery request,
                                                         CancellationToken cancellationToken)
 {
     return(_repository.GetQueryable().Select(x => new CourseTitleViewModel {
         Id = x.Id, ImagePath = x.ImagePath, Name = x.Name, Description = x.Description
     })
            .ToList());
 }
 public async Task <ActionResult <List <CourseTitleViewModel> > > Get(GetCourseTitlesQuery query)
 {
     return(Ok(await _mediator.Send(query)));
 }