Ignore:
Timestamp:
07/29/20 13:21:48 (2 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
de18858
Parents:
ef1219a
Message:

Add more services

Location:
FarmatikoServices/Services
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • FarmatikoServices/Services/HealthFacilityService.cs

    ref1219a re42f61a  
    2525            return _healthFacilityRepository.GetAll();
    2626        }
    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         }
    3727    }
    3828}
  • FarmatikoServices/Services/HealthcareWorkerService.cs

    ref1219a re42f61a  
    1 using FarmatikoData.FarmatikoRepoInterfaces;
    2 using FarmatikoData.FarmatikoServiceInterfaces;
     1using FarmatikoData.FarmatikoRepo;
     2using FarmatikoData.FarmatikoRepoInterfaces;
    33using FarmatikoData.Models;
     4using FarmatikoServices.FarmatikoServiceInterfaces;
    45using System;
    56using System.Collections.Generic;
     
    1011    public class HealthcareWorkerService : IHealthcareWorkerService
    1112    {
    12         private IHealthcareWorkersRepository _workersRepository;
    13         public HealthcareWorkerService(IHealthcareWorkersRepository workersRepository)
     13        private IHealthcareWorkerRepository _healthcareWorkerRepo;
     14        public HealthcareWorkerService(IHealthcareWorkerRepository healthcareWorkerRepo)
    1415        {
    15             _workersRepository = workersRepository;
     16            _healthcareWorkerRepo = healthcareWorkerRepo;
    1617        }
    17         public void Add(HealthcareWorkers HealthcareWorker)
     18        public void Add(HealthcareWorkers healthcareWorker)
    1819        {
    19             _workersRepository.Add(HealthcareWorker);
     20            _healthcareWorkerRepo.Add(healthcareWorker);
    2021        }
    2122
    2223        public IEnumerable<HealthcareWorkers> GetAll()
    2324        {
    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();
    4026        }
    4127    }
Note: See TracChangeset for help on using the changeset viewer.