source: Farmatiko/Controllers/HealthcareWorkerController.cs@ a55ef91

Last change on this file since a55ef91 was a55ef91, checked in by DimitarSlezenkovski <dslezenkovski@…>, 2 years ago

Update & add service

  • Property mode set to 100644
File size: 685 bytes
Line 
1using System.Linq;
2using FarmatikoData.Models;
3using FarmatikoServices.FarmatikoServiceInterfaces;
4using Microsoft.AspNetCore.Mvc;
5
6namespace Farmatiko.Controllers
7{
8 [ApiController]
9 [Route("[controller]/[action]")]
10 public class HealthcareWorkerController : Controller
11 {
12 private IHealthcareWorkerService _healthcareWorkerService;
13 public HealthcareWorkerController(IHealthcareWorkerService healthcareWorkerService)
14 {
15 _healthcareWorkerService = healthcareWorkerService;
16 }
17
18 [HttpGet]
19 public IQueryable<HealthcareWorkers> Get()
20 {
21 return _healthcareWorkerService.GetAll();
22 }
23
24 }
25}
Note: See TracBrowser for help on using the repository browser.