Test EF / Mysql
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using LaDOSE.Api.Context;
|
||||
using LaDOSE.Entity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LaDOSE.Api.Controllers
|
||||
@@ -10,11 +12,20 @@ namespace LaDOSE.Api.Controllers
|
||||
[ApiController]
|
||||
public class ConfigController : ControllerBase
|
||||
{
|
||||
|
||||
private readonly LaDOSEDbContext _db;
|
||||
|
||||
public ConfigController(LaDOSEDbContext db)
|
||||
{
|
||||
_db = db;
|
||||
}
|
||||
// GET api/Config
|
||||
[HttpGet]
|
||||
public ActionResult<IEnumerable<string>> Get()
|
||||
public ActionResult<IEnumerable<Game>> Get()
|
||||
{
|
||||
return new string[] { "value1", "value2" };
|
||||
|
||||
return _db.Game.ToList();
|
||||
|
||||
}
|
||||
|
||||
// GET api/Config/5
|
||||
|
||||
Reference in New Issue
Block a user