Changeset e42f61a for FarmatikoServices


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

Add more services

Location:
FarmatikoServices
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • FarmatikoServices/FarmatikoServiceInterfaces/IHealthFacilityService.cs

    ref1219a re42f61a  
    88    public interface IHealthFacilityService
    99    {
    10         IEnumerable<HealthFacilities> GetByName(string name);
    1110        IEnumerable<HealthFacilities> GetAll();
    12         IEnumerable<HealthFacilities> GetByType(string Type);
    1311        void Add(HealthFacilities healthFacility);
    1412    }
  • FarmatikoServices/FarmatikoServiceInterfaces/IHealthcareWorkerService.cs

    ref1219a re42f61a  
    11using FarmatikoData.Models;
     2using System;
    23using System.Collections.Generic;
     4using System.Text;
    35
    4 namespace FarmatikoData.FarmatikoServiceInterfaces
     6namespace FarmatikoServices.FarmatikoServiceInterfaces
    57{
    68    public interface IHealthcareWorkerService
    79    {
    810        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);*/
    1314    }
    1415}
  • 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.