source: Farmatiko/Controllers/PharmacyController.cs@ 4e72684

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

Add services

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