Refactored repositories and fixed service injections
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Domain\Interfaces\" />
|
||||
<Folder Include="Interfaces\" />
|
||||
<Folder Include="Handlers\CommandHandlers\" />
|
||||
<Folder Include="Commands\" />
|
||||
<Folder Include="Handlers\QueryHandlers\" />
|
||||
|
||||
@@ -4,5 +4,6 @@ using System.Text;
|
||||
|
||||
namespace BrightGlimmer.Cqrs
|
||||
{
|
||||
/* USED TO GET ASSEMBLY IN STARTUP.CS */
|
||||
public class Cqrs { }
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using BrightGlimmer.Domain;
|
||||
using MediatR;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BrightGlimmer.Services.Queries
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user