Changeset e42f61a for FarmatikoServices
- Timestamp:
- 07/29/20 13:21:48 (4 years ago)
- Branches:
- master
- Children:
- de18858
- Parents:
- ef1219a
- Location:
- FarmatikoServices
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoServices/FarmatikoServiceInterfaces/IHealthFacilityService.cs
ref1219a re42f61a 8 8 public interface IHealthFacilityService 9 9 { 10 IEnumerable<HealthFacilities> GetByName(string name);11 10 IEnumerable<HealthFacilities> GetAll(); 12 IEnumerable<HealthFacilities> GetByType(string Type);13 11 void Add(HealthFacilities healthFacility); 14 12 } -
FarmatikoServices/FarmatikoServiceInterfaces/IHealthcareWorkerService.cs
ref1219a re42f61a 1 1 using FarmatikoData.Models; 2 using System; 2 3 using System.Collections.Generic; 4 using System.Text; 3 5 4 namespace Farmatiko Data.FarmatikoServiceInterfaces6 namespace FarmatikoServices.FarmatikoServiceInterfaces 5 7 { 6 8 public interface IHealthcareWorkerService 7 9 { 8 10 IEnumerable<HealthcareWorkers> GetAll(); 9 HealthcareWorkers GetByName(string Name); 10 IEnumerable<HealthcareWorkers> GetAllByBranch(string Branch); 11 IEnumerable<HealthcareWorkers> GetAllByFacility(HealthFacilities Facility); 12 void Add(HealthcareWorkers HealthcareWorker); 11 void Add(HealthcareWorkers healthcareWorker); 12 //Not needed 13 /*void Remove(HealthcareWorkers healthcareWorker);*/ 13 14 } 14 15 } -
FarmatikoServices/Services/HealthFacilityService.cs
ref1219a re42f61a 25 25 return _healthFacilityRepository.GetAll(); 26 26 } 27 28 public IEnumerable<HealthFacilities> GetByName(string name)29 {30 return _healthFacilityRepository.GetAllByName(name);31 }32 33 public IEnumerable<HealthFacilities> GetByType(string Type)34 {35 return _healthFacilityRepository.GetByType(Type);36 }37 27 } 38 28 } -
FarmatikoServices/Services/HealthcareWorkerService.cs
ref1219a re42f61a 1 using FarmatikoData.FarmatikoRepo Interfaces;2 using FarmatikoData.Farmatiko ServiceInterfaces;1 using FarmatikoData.FarmatikoRepo; 2 using FarmatikoData.FarmatikoRepoInterfaces; 3 3 using FarmatikoData.Models; 4 using FarmatikoServices.FarmatikoServiceInterfaces; 4 5 using System; 5 6 using System.Collections.Generic; … … 10 11 public class HealthcareWorkerService : IHealthcareWorkerService 11 12 { 12 private IHealthcareWorker sRepository _workersRepository;13 public HealthcareWorkerService(IHealthcareWorker sRepository workersRepository)13 private IHealthcareWorkerRepository _healthcareWorkerRepo; 14 public HealthcareWorkerService(IHealthcareWorkerRepository healthcareWorkerRepo) 14 15 { 15 _ workersRepository = workersRepository;16 _healthcareWorkerRepo = healthcareWorkerRepo; 16 17 } 17 public void Add(HealthcareWorkers HealthcareWorker)18 public void Add(HealthcareWorkers healthcareWorker) 18 19 { 19 _ workersRepository.Add(HealthcareWorker);20 _healthcareWorkerRepo.Add(healthcareWorker); 20 21 } 21 22 22 23 public IEnumerable<HealthcareWorkers> GetAll() 23 24 { 24 return _workersRepository.GetAll(); 25 } 26 27 public IEnumerable<HealthcareWorkers> GetAllByBranch(string Branch) 28 { 29 return _workersRepository.GetByBranch(Branch); 30 } 31 32 public IEnumerable<HealthcareWorkers> GetAllByFacility(HealthFacilities Facility) 33 { 34 return _workersRepository.GetByFacility(Facility); 35 } 36 37 public HealthcareWorkers GetByName(string Name) 38 { 39 return _workersRepository.GetByName(Name); 25 return _healthcareWorkerRepo.GetAll(); 40 26 } 41 27 }
Note:
See TracChangeset
for help on using the changeset viewer.