var kk = await _context.Patients.Where(p => p.Id == id)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Medicine)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Doctor)
.ToListAsync();
var gg = await _context.Patients.Where(p => p.Id == id)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Medicine)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Doctor)
.Select(p => new
{
Prescription = p.Prescriptions.Select(p => p.ToDto())
})
.ToListAsync();
var kk = await _context.Patients.Where(p => p.Id == id)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Medicine)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Doctor)
.ToListAsync();
var gg = await _context.Patients.Where(p => p.Id == id)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Medicine)
.Include(p => p.Prescriptions)
.ThenInclude(p => p.Doctor)
.Select(p => new
{
Prescription = p.Prescriptions.Select(p => p.ToDto())
})
.ToListAsync();