source: Farmatiko/Controllers/MedicineListController.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: 658 bytes
Line 
1using System.Collections.Generic;
2using FarmatikoData.Models;
3using FarmatikoServices.FarmatikoServiceInterfaces;
4using Microsoft.AspNetCore.Mvc;
5
6namespace Farmatiko.Controllers
7{
8 [ApiController]
9 [Route("[controller]/[action]")]
10 public class MedicineListController : Controller
11 {
12 private IMedicineListService _medicineListService;
13 public MedicineListController(IMedicineListService medicineListService)
14 {
15 _medicineListService = medicineListService;
16 }
17 [HttpGet]
18 public IEnumerable<MedicineList> Get()
19 {
20 return _medicineListService.GetAll();
21 }
22 }
23}
Note: See TracBrowser for help on using the repository browser.