Ignore:
Timestamp:
07/29/20 20:02:58 (4 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
a55ef91
Parents:
de18858
Message:

Add services

File:
1 edited

Legend:

Unmodified
Added
Removed
  • FarmatikoData/FarmatikoRepo/PharmacyHeadRepository.cs

    rde18858 r4e72684  
    2323        }
    2424
    25         public ICollection<PharmacyHead> GetAllPharmacies(string NameOfPharmacyHead)
     25        public IQueryable<PharmacyHead> GetAllPharmacies(string NameOfPharmacyHeads)
    2626        {
    27             return (ICollection<PharmacyHead>)_context.PharmacyHeads.Where(pharmacyHead => pharmacyHead.Name.Equals(NameOfPharmacyHead));
     27            return _context.PharmacyHeads
     28                .Where(pharmacyHead => pharmacyHead.Name.Contains(NameOfPharmacyHeads))
     29                .OrderBy(x => x.Name);
    2830        }
    2931        //Not needed
    30         public IEnumerable<PharmacyHead> GetPharmacyByName(string Name)
     32        public IQueryable<PharmacyHead> GetPharmacyByName(string Name)
    3133        {
    3234            return _context.PharmacyHeads.Where(pharmacyHead => pharmacyHead.Name.Equals(Name));
     35        }
     36
     37        public IQueryable<MedicineList> GetPharmacyMedicines(string NameOfPharmacy)
     38        {
     39
     40            IQueryable<MedicineList> Pharmacy = (IQueryable<MedicineList>)_context.PharmacyHeads.Where(x => x.Name.Equals(NameOfPharmacy));
     41           
     42            return Pharmacy;
    3343        }
    3444
Note: See TracChangeset for help on using the changeset viewer.