public async Task <bool> CodeControl(string code)
        {
            var medicines = await medicineRepository.GetAllMedicine();

            var codes = medicines.Select(i => i.Code);

            return(codes.Any(i => i == code));
        }
Example #2
0
 public async Task <List <Medicine> > GetAllMedicine()
 {
     return(await medicineRepository.GetAllMedicine());
 }
 public List <Medicine> GetAllMedicine()
 {
     return(medicineRepository.GetAllMedicine());
 }