Last change
on this file since e42f61a was e42f61a, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago |
Add more services
|
-
Property mode
set to
100644
|
File size:
681 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Threading.Tasks;
|
---|
5 | using FarmatikoData.Models;
|
---|
6 | using FarmatikoServices.FarmatikoServiceInterfaces;
|
---|
7 | using Microsoft.AspNetCore.Mvc;
|
---|
8 |
|
---|
9 | namespace 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.