Last change
on this file since d2e69be was d2e69be, checked in by DimitarSlezenkovski <dslezenkovski@…>, 5 years ago |
Add Route Attribute
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[d2e69be] | 1 | using Microsoft.AspNetCore.Mvc;
|
---|
| 2 | using FarmatikoData.FarmatikoServiceInterfaces;
|
---|
| 3 | using System.Collections.Generic;
|
---|
| 4 | using FarmatikoData.Models;
|
---|
| 5 |
|
---|
| 6 | namespace Farmatiko.Controllers
|
---|
| 7 | {
|
---|
| 8 | public class HealthcareWorkerController : Controller
|
---|
| 9 | {
|
---|
| 10 | private IHealthcareWorkerService _healthcareWorkerService;
|
---|
| 11 | public HealthcareWorkerController(IHealthcareWorkerService healthcareWorkerService)
|
---|
| 12 | {
|
---|
| 13 | _healthcareWorkerService = healthcareWorkerService;
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | [HttpGet]
|
---|
| 17 | public IEnumerable<HealthcareWorkers> GetAll()
|
---|
| 18 | {
|
---|
| 19 | return _healthcareWorkerService.GetAll();
|
---|
| 20 | }
|
---|
| 21 | [HttpGet]
|
---|
| 22 | public HealthcareWorkers GetByName(string Name)
|
---|
| 23 | {
|
---|
| 24 | return _healthcareWorkerService.GetByName(Name);
|
---|
| 25 | }
|
---|
| 26 | [HttpGet]
|
---|
| 27 | public IEnumerable<HealthcareWorkers> GetAllByBranch(string Branch)
|
---|
| 28 | {
|
---|
| 29 | return _healthcareWorkerService.GetAllByBranch(Branch);
|
---|
| 30 | }
|
---|
| 31 | [HttpGet]
|
---|
| 32 | public IEnumerable<HealthcareWorkers> GetAllByFacility(HealthFacilities Facility)
|
---|
| 33 | {
|
---|
| 34 | return _healthcareWorkerService.GetAllByFacility(Facility);
|
---|
| 35 | }
|
---|
| 36 | [HttpGet]
|
---|
| 37 | public void Add(HealthcareWorkers HealthcareWorker)
|
---|
| 38 | {
|
---|
| 39 | _healthcareWorkerService.Add(HealthcareWorker);
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.