2021-10-23 12:49:42 +01:00
|
|
|
using System;
|
2021-10-23 22:16:37 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Threading.Tasks;
|
2021-10-23 12:49:42 +01:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2021-10-23 22:16:37 +01:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Selector.Model;
|
2021-10-23 12:49:42 +01:00
|
|
|
|
|
|
|
namespace Selector.Web.Controller {
|
|
|
|
|
|
|
|
[ApiController]
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
public class TestController {
|
|
|
|
|
2021-10-23 22:16:37 +01:00
|
|
|
private readonly SelectorContext db;
|
|
|
|
|
|
|
|
public TestController(SelectorContext context)
|
|
|
|
{
|
|
|
|
db = context;
|
|
|
|
}
|
|
|
|
|
2021-10-23 12:49:42 +01:00
|
|
|
[HttpGet]
|
2021-10-23 22:16:37 +01:00
|
|
|
public async Task<ActionResult<IEnumerable<Watcher>>> Get()
|
2021-10-23 12:49:42 +01:00
|
|
|
{
|
2021-10-23 22:16:37 +01:00
|
|
|
// var watchers = ;
|
|
|
|
return await db.Watcher.ToListAsync();
|
2021-10-23 12:49:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|