source: Farmatiko/Controllers/HealthcareWorkerController.cs@ a6bbad1

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

Update & add service

  • Property mode set to 100644
File size: 685 bytes
RevLine 
[a55ef91]1using System.Linq;
[d2e69be]2using FarmatikoData.Models;
[e42f61a]3using FarmatikoServices.FarmatikoServiceInterfaces;
4using Microsoft.AspNetCore.Mvc;
[d2e69be]5
6namespace 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.