Flesh out domain and start student commands
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="Interfaces\" />
|
||||
<Folder Include="Handlers\CommandHandlers\" />
|
||||
<Folder Include="Commands\" />
|
||||
<Folder Include="Handlers\QueryHandlers\" />
|
||||
<Folder Include="Queries\" />
|
||||
</ItemGroup>
|
||||
|
||||
11
BrightGlimmer.Service/Commands/CreateStudentCommand.cs
Normal file
11
BrightGlimmer.Service/Commands/CreateStudentCommand.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using MediatR;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BrightGlimmer.Service.Commands
|
||||
{
|
||||
public class CreateStudentCommand : IRequest<bool>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,11 @@ namespace BrightGlimmer.Services.Handlers.QueryHandlers
|
||||
|
||||
public async Task<IEnumerable<Student>> Handle(GetAllStudentsQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
return await repository.Get().ToListAsync();
|
||||
return await repository.Get()
|
||||
.Include(x => x.Phones)
|
||||
.Include(x => x.Address)
|
||||
.Include(x => x.AssignedCourses)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user