public async Task <IActionResult> GetMedicines() { GetMedicinesRequest request = new GetMedicinesRequest(); var response = await _medicineService.GetMedicinesAsync(request); return(GenerateResponse(response)); }
public async Task <GetMedicinesResponse> GetMedicinesAsync(GetMedicinesRequest request) { var response = new GetMedicinesResponse(); var list = await _medicineRepository.GetMedicinesAsync(); response.Medicines = list.Select(x => _medicineMapper.ToModel(x)).ToList(); return(response); }