Flesh out domain and start student commands

This commit is contained in:
2019-04-24 17:50:37 +00:00
parent a51306af55
commit a30e9a5b1c
18 changed files with 648 additions and 197 deletions

View File

@@ -7,7 +7,6 @@
<ItemGroup>
<Folder Include="Interfaces\" />
<Folder Include="Handlers\CommandHandlers\" />
<Folder Include="Commands\" />
<Folder Include="Handlers\QueryHandlers\" />
<Folder Include="Queries\" />
</ItemGroup>

View 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>
{
}
}

View File

@@ -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();
}
}
}