From 69a554ce762a377a10857980ea965ac30c2479bb Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Fri, 16 Feb 2024 22:35:15 +0300 Subject: [PATCH] fix: change entity --- .../Queries/GetProfessorDetails/GetProfessorInfoQueryHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Cqrs/Professor/Queries/GetProfessorDetails/GetProfessorInfoQueryHandler.cs b/Application/Cqrs/Professor/Queries/GetProfessorDetails/GetProfessorInfoQueryHandler.cs index 411a68d..868201d 100644 --- a/Application/Cqrs/Professor/Queries/GetProfessorDetails/GetProfessorInfoQueryHandler.cs +++ b/Application/Cqrs/Professor/Queries/GetProfessorDetails/GetProfessorInfoQueryHandler.cs @@ -11,7 +11,7 @@ public class GetProfessorInfoQueryHandler(IProfessorDbContext dbContext) : IRequ { public async Task 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() {