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