Skip to content
Snippets Groups Projects
Commit a77f1422 authored by Radek Puš's avatar Radek Puš
Browse files

template chart controllers

parent 1373c97b
No related branches found
No related tags found
No related merge requests found
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Core.Data;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Core.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ForecastController : ControllerBase
{
private readonly Model Context;
public ForecastController(Model context)
{
Context = context;
}
// GET: api/Forecast
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// POST: api/Forecast
[HttpPost]
public void Post([FromBody] string value)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Core.Data;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Core.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class HistoryController : ControllerBase
{
private readonly Model Context;
public HistoryController(Model context)
{
Context = context;
}
// GET: api/History
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// POST: api/History
[HttpPost]
public void Post([FromBody] string value)
{
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment