source: Farmatiko/Controllers/MedicineController.cs@ e42f61a

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

Add more 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 MedicineController : Controller
14 {
15 private IMedicineService _medicineService;
16 public MedicineController(IMedicineService medicineService)
17 {
18 _medicineService = medicineService;
19 }
20 [HttpGet]
21 public IEnumerable<Medicine> Get()
22 {
23 return _medicineService.GetAll();
24 }
25 }
26}
Note: See TracBrowser for help on using the repository browser.