Refactored repositories and fixed service injections

This commit is contained in:
Giovani
2019-04-23 22:52:58 +00:00
parent 3dd68121ee
commit 8e3cdc97ef
15 changed files with 80 additions and 78 deletions

View File

@@ -3,10 +3,7 @@ using BrightGlimmer.Domain;
using BrightGlimmer.Services.Queries;
using MediatR;
using Microsoft.EntityFrameworkCore; /* TODO */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -14,9 +11,9 @@ namespace BrightGlimmer.Services.Handlers.QueryHandlers
{
public class GetAllStudentsQueryHandler : IRequestHandler<GetAllStudentsQuery, IEnumerable<Student>>
{
private readonly IRepository<Student> repository;
private readonly IQueryRepository<Student> repository;
public GetAllStudentsQueryHandler(IRepository<Student> repository)
public GetAllStudentsQueryHandler(IQueryRepository<Student> repository)
{
this.repository = repository;
}