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