Last change
on this file since c73269d was a55ef91, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago |
Update & add service
|
-
Property mode
set to
100644
|
File size:
685 bytes
|
Rev | Line | |
---|
[a55ef91] | 1 | using System.Linq;
|
---|
[d2e69be] | 2 | using FarmatikoData.Models;
|
---|
[e42f61a] | 3 | using FarmatikoServices.FarmatikoServiceInterfaces;
|
---|
| 4 | using Microsoft.AspNetCore.Mvc;
|
---|
[d2e69be] | 5 |
|
---|
| 6 | namespace Farmatiko.Controllers
|
---|
| 7 | {
|
---|
[e42f61a] | 8 | [ApiController]
|
---|
| 9 | [Route("[controller]/[action]")]
|
---|
[d2e69be] | 10 | public class HealthcareWorkerController : Controller
|
---|
| 11 | {
|
---|
| 12 | private IHealthcareWorkerService _healthcareWorkerService;
|
---|
| 13 | public HealthcareWorkerController(IHealthcareWorkerService healthcareWorkerService)
|
---|
| 14 | {
|
---|
| 15 | _healthcareWorkerService = healthcareWorkerService;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | [HttpGet]
|
---|
[a55ef91] | 19 | public IQueryable<HealthcareWorkers> Get()
|
---|
[d2e69be] | 20 | {
|
---|
| 21 | return _healthcareWorkerService.GetAll();
|
---|
| 22 | }
|
---|
[e42f61a] | 23 |
|
---|
[d2e69be] | 24 | }
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.