source: Farmatiko/Controllers/HealthFacilitiesController.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: 1.3 KB
RevLine 
[d2e69be]1using FarmatikoData;
2using FarmatikoData.Models;
[a55ef91]3using FarmatikoServices.FarmatikoServiceInterfaces;
[d2e69be]4using Microsoft.AspNetCore.Mvc;
[a55ef91]5using Microsoft.Extensions.Logging;
6using Newtonsoft.Json;
7using Newtonsoft.Json.Linq;
8using System;
[d2e69be]9using System.Collections.Generic;
[a55ef91]10using System.Linq;
11using System.Net;
12using System.Threading.Tasks;
[d2e69be]13
14namespace Farmatiko.Controllers
15{
16 [ApiController]
17 [Route("[controller]/[action]")]
18 public class HealthFacilitiesController : Controller
19 {
20 private IHealthFacilityService _healthFacilitiesService;
[a55ef91]21 private IProcessJSONService _processJSONService;
22 /*private IProcessJSONService _processJSONService;*/
23 private string Path = @"C:\Users\dslez\Desktop\ustanovi.json";
24 public HealthFacilitiesController(IHealthFacilityService healthFacilitiesService, IProcessJSONService processJSONService)
[d2e69be]25 {
26 _healthFacilitiesService = healthFacilitiesService;
[a55ef91]27 _processJSONService = processJSONService;
[d2e69be]28 }
29 [HttpGet]
[a55ef91]30 public IQueryable<HealthFacilities> Get()
[d2e69be]31 {
32 return _healthFacilitiesService.GetAll();
33 }
[a55ef91]34 /* public void Index()
35
36 {
37 _processJSONService.GetProcessedHealthFacilitiesFromJSON();
38 }*/
[d2e69be]39 }
40}
Note: See TracBrowser for help on using the repository browser.