FlexitimeTracker/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/CardsController.cs
chris.watts90@outlook.com 1e8d56ab82 csproj update to reference Interfaces and SQLiteRepository implementation.
Complete IRepository migration into the ApiControllers.
remove any nuget packages from the packages.config which refer to sqlite and entity framework.
missing csproj update for SQLiteRepository project. Sorry..
2017-01-31 22:09:40 +00:00

27 lines
642 B
C#

using System;
using System.Web.Http;
using Interfaces;
namespace WindowsDataCenter
{
[RoutePrefix("api/cards")]
public class CardsController : ApiController
{
private readonly IRepository _repo;
public CardsController(IRepository repo)
{
if(repo == null) throw new ArgumentNullException(nameof(repo));
_repo = repo;
}
[HttpGet]
[Route("unassigned")]
public IHttpActionResult GetUnassignedCards()
{
var unassignedCards = _repo.GetUnassignedIdentifierList();
return Ok(unassignedCards);
}
}
}