[Kanban] AppointmentRepository.GetAllAppointments does not return UserName
Closed this issue · 4 comments
fcatae commented
It returns the user unique name, but not the user name.
var response = (from a in _context.Appointments
join w in _context.WorkloadBacklogs on a.AppointmentWorkload.WBID equals w.WBID
orderby a.AppointmentDate descending
select new AppointmentViewModel
{
_AppointmentID = a.AppointmentID,
_AppointmentWorkloadWBID = a.AppointmentWorkload.WBID,
_WorkloadTitle = w.WBTitle,
_AppointmentDate = a.AppointmentDate,
_AppointmentHoursDispensed = a.AppointmentHoursDispensed,
_AppointmentUserUniqueName = a.AppointmentUser.UniqueName
}).ToList();
fcatae commented
The same applies to public List<AppointmentViewModel> GetAllAppointments(string user)
fcatae commented
It also happens at public AppointmentViewModel GetAppointmentByID(Guid id)
fcatae commented
It does not return UserName, but it returns UniqueName.
Workaround: lookup username by UniqueName.
fcatae commented
Closing as won't fix.
Reason: it requires an additional join to retrieve the username. However, this information is not important and it is quite expensive (in terms of network bandwidth). There is no demand to justify it.