source: Farmatiko/Controllers/PandemicController.cs@ a55ef91

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

Update & add service

  • Property mode set to 100644
File size: 602 bytes
Line 
1using System.Linq;
2using FarmatikoData.Models;
3using FarmatikoServices.FarmatikoServiceInterfaces;
4using Microsoft.AspNetCore.Mvc;
5
6namespace 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]
18 public IQueryable<Pandemic> Get()
19 {
20 return _pandemicService.GetAll();
21 }
22 }
23}
Note: See TracBrowser for help on using the repository browser.