Last change
on this file since d8fafb8 was a55ef91, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago |
Update & add service
|
-
Property mode
set to
100644
|
File size:
602 bytes
|
Rev | Line | |
---|
[a55ef91] | 1 | using System.Linq;
|
---|
[4e72684] | 2 | using FarmatikoData.Models;
|
---|
| 3 | using FarmatikoServices.FarmatikoServiceInterfaces;
|
---|
| 4 | using Microsoft.AspNetCore.Mvc;
|
---|
| 5 |
|
---|
| 6 | namespace Farmatiko.Controllers
|
---|
| 7 | {
|
---|
| 8 | [ApiController]
|
---|
| 9 | [Route("[controller]/[action]")]
|
---|
| 10 | public class PandemicController : Controller
|
---|
| 11 | {
|
---|
| 12 | private IPandemicService _pandemicService;
|
---|
| 13 | public PandemicController(IPandemicService pandemicService)
|
---|
| 14 | {
|
---|
| 15 | _pandemicService = pandemicService;
|
---|
| 16 | }
|
---|
| 17 | [HttpGet]
|
---|
[a55ef91] | 18 | public IQueryable<Pandemic> Get()
|
---|
[4e72684] | 19 | {
|
---|
| 20 | return _pandemicService.GetAll();
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.