Changeset e42f61a for Farmatiko/Controllers
- Timestamp:
- 07/29/20 13:21:48 (4 years ago)
- Branches:
- master
- Children:
- de18858
- Parents:
- ef1219a
- Location:
- Farmatiko/Controllers
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/Controllers/HealthFacilitiesController.cs
ref1219a re42f61a 1 1 using FarmatikoData; 2 2 using FarmatikoData.Models; 3 using Microsoft.AspNetCore.Cors; 3 4 using Microsoft.AspNetCore.Mvc; 4 5 using System.Collections.Generic; … … 20 21 return _healthFacilitiesService.GetAll(); 21 22 } 22 [HttpGet]23 public IEnumerable<HealthFacilities> GetByName(string Name)24 {25 return _healthFacilitiesService.GetByName(Name);26 }27 28 [HttpGet]29 public IEnumerable<HealthFacilities> GetByType(string Type)30 {31 return _healthFacilitiesService.GetByType(Type);32 }33 [HttpPut]34 public void Add(HealthFacilities healthFacility)35 {36 _healthFacilitiesService.Add(healthFacility);37 }38 23 } 39 24 } -
Farmatiko/Controllers/HealthcareWorkerController.cs
ref1219a re42f61a 1 using Microsoft.AspNetCore.Mvc; 2 using FarmatikoData.FarmatikoServiceInterfaces; 1 using System; 3 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Threading.Tasks; 4 5 using FarmatikoData.Models; 6 using FarmatikoServices.FarmatikoServiceInterfaces; 7 using Microsoft.AspNetCore.Mvc; 5 8 6 9 namespace Farmatiko.Controllers 7 10 { 11 [ApiController] 12 [Route("[controller]/[action]")] 8 13 public class HealthcareWorkerController : Controller 9 14 { … … 15 20 16 21 [HttpGet] 17 public IEnumerable<HealthcareWorkers> Get All()22 public IEnumerable<HealthcareWorkers> Get() 18 23 { 19 24 return _healthcareWorkerService.GetAll(); 20 25 } 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 } 26 41 27 } 42 28 }
Note:
See TracChangeset
for help on using the changeset viewer.