Add queries #8
@ -11,7 +11,7 @@ public class GetProfessorInfoQueryHandler(IProfessorDbContext dbContext) : IRequ
|
|||||||
{
|
{
|
||||||
public async Task<ProfessorInfoVm> Handle(GetProfessorInfoQuery request, CancellationToken cancellationToken)
|
public async Task<ProfessorInfoVm> Handle(GetProfessorInfoQuery request, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var discipline = await dbContext.Professors.FirstOrDefaultAsync(p => p.Id == request.Id, cancellationToken) ?? throw new NotFoundException(typeof(Domain.Schedule.Group), request.Id);
|
var discipline = await dbContext.Professors.FirstOrDefaultAsync(p => p.Id == request.Id, cancellationToken) ?? throw new NotFoundException(typeof(Domain.Schedule.Professor), request.Id);
|
||||||
|
|
||||||
return new ProfessorInfoVm()
|
return new ProfessorInfoVm()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user