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..
27 lines
642 B
C#
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);
|
|
}
|
|
}
|
|
} |