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

Add more services

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/Controllers/HealthcareWorkerController.cs

    ref1219a re42f61a  
    1 using Microsoft.AspNetCore.Mvc;
    2 using FarmatikoData.FarmatikoServiceInterfaces;
     1using System;
    32using System.Collections.Generic;
     3using System.Linq;
     4using System.Threading.Tasks;
    45using FarmatikoData.Models;
     6using FarmatikoServices.FarmatikoServiceInterfaces;
     7using Microsoft.AspNetCore.Mvc;
    58
    69namespace Farmatiko.Controllers
    710{
     11    [ApiController]
     12    [Route("[controller]/[action]")]
    813    public class HealthcareWorkerController : Controller
    914    {
     
    1520
    1621        [HttpGet]
    17         public IEnumerable<HealthcareWorkers> GetAll()
     22        public IEnumerable<HealthcareWorkers> Get()
    1823        {
    1924            return _healthcareWorkerService.GetAll();
    2025        }
    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
    4127    }
    4228}
Note: See TracChangeset for help on using the changeset viewer.