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