2018-10-04 21:13:32 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2018-10-05 00:18:37 +02:00
|
|
|
|
using LaDOSE.Api.Context;
|
|
|
|
|
|
using LaDOSE.Entity;
|
2018-10-04 21:13:32 +02:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
|
|
namespace LaDOSE.Api.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
|
|
[ApiController]
|
|
|
|
|
|
public class ConfigController : ControllerBase
|
|
|
|
|
|
{
|
2018-10-05 00:18:37 +02:00
|
|
|
|
|
|
|
|
|
|
private readonly LaDOSEDbContext _db;
|
|
|
|
|
|
|
|
|
|
|
|
public ConfigController(LaDOSEDbContext db)
|
|
|
|
|
|
{
|
|
|
|
|
|
_db = db;
|
|
|
|
|
|
}
|
2018-10-04 21:13:32 +02:00
|
|
|
|
// GET api/Config
|
|
|
|
|
|
[HttpGet]
|
2018-10-05 00:18:37 +02:00
|
|
|
|
public ActionResult<IEnumerable<Game>> Get()
|
2018-10-04 21:13:32 +02:00
|
|
|
|
{
|
2018-10-05 00:18:37 +02:00
|
|
|
|
|
|
|
|
|
|
return _db.Game.ToList();
|
|
|
|
|
|
|
2018-10-04 21:13:32 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GET api/Config/5
|
|
|
|
|
|
[HttpGet("{id}")]
|
|
|
|
|
|
public ActionResult<string> Get(int id)
|
|
|
|
|
|
{
|
|
|
|
|
|
return "value";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|