diff --git a/CleanAspCore/Features/Employees/Endpoints/GetEmployeeById.cs b/CleanAspCore/Features/Employees/Endpoints/GetEmployeeById.cs index 0b5f096..2c4260a 100644 --- a/CleanAspCore/Features/Employees/Endpoints/GetEmployeeById.cs +++ b/CleanAspCore/Features/Employees/Endpoints/GetEmployeeById.cs @@ -5,7 +5,7 @@ namespace CleanAspCore.Features.Employees.Endpoints; -public sealed record EmployeeDto(string FirstName, string LastName, string Email, string Gender, Guid DepartmentId, Guid JobId); +public sealed record EmployeeDto(Guid Id, string FirstName, string LastName, string Email, string Gender, Guid DepartmentId, Guid JobId); internal static class GetEmployeeById { @@ -19,6 +19,7 @@ internal static async Task> Handle(Guid id, HrContex } private static EmployeeDto ToDto(this Employee employee) => new( + employee.Id, employee.FirstName, employee.LastName, employee.Email.ToString(),