Fixed csproj and removed unused folders

This commit is contained in:
2019-04-23 22:58:22 +00:00
parent f9badf98f4
commit a51306af55
7 changed files with 7 additions and 19 deletions

View File

@@ -0,0 +1,26 @@
using BrightGlimmer.Data.Interfaces;
using BrightGlimmer.Domain;
using BrightGlimmer.Services.Queries;
using MediatR;
using Microsoft.EntityFrameworkCore; /* TODO */
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace BrightGlimmer.Services.Handlers.QueryHandlers
{
public class GetAllStudentsQueryHandler : IRequestHandler<GetAllStudentsQuery, IEnumerable<Student>>
{
private readonly IQueryRepository<Student> repository;
public GetAllStudentsQueryHandler(IQueryRepository<Student> repository)
{
this.repository = repository;
}
public async Task<IEnumerable<Student>> Handle(GetAllStudentsQuery request, CancellationToken cancellationToken)
{
return await repository.Get().ToListAsync();
}
}
}