Changeset e42f61a for FarmatikoData/FarmatikoRepo/MedicineRepository.cs
- Timestamp:
- 07/29/20 13:21:48 (4 years ago)
- Branches:
- master
- Children:
- de18858
- Parents:
- ef1219a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoData/FarmatikoRepo/MedicineRepository.cs
ref1219a re42f61a 27 27 } 28 28 29 public Medicine GetByName(string Name)29 public IEnumerable<Medicine> GetByManufacturer(string Manufacturer) 30 30 { 31 return (Medicine)_context.Medicines.Where(medicine => medicine.Name == Name); 31 return _context.Medicines.Where(x => x.Name.Contains(Manufacturer)).OrderBy(x => x.Manufacturer); 32 } 33 34 public IEnumerable<Medicine> GetByName(string Name) 35 { 36 return (IEnumerable<Medicine>)_context.Medicines.Where(medicine => medicine.Name == Name); 32 37 } 33 38 … … 35 40 { 36 41 Medicine med = (Medicine)_context.Medicines.Where(medicine => medicine.Name.Equals(medicine)); 37 _context. Medicines.Remove(med);42 _context.Remove(med); 38 43 } 39 44 }
Note:
See TracChangeset
for help on using the changeset viewer.