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..
This commit is contained in:
parent
dd8d91279f
commit
1e8d56ab82
@ -53,7 +53,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="CardUniqueId.cs" />
|
<Compile Include="CardUniqueId.cs" />
|
||||||
<Compile Include="Class1.cs" />
|
<Compile Include="SQLiteRepository.cs" />
|
||||||
<Compile Include="Constants.cs" />
|
<Compile Include="Constants.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="SQLiteProcedures.cs" />
|
<Compile Include="SQLiteProcedures.cs" />
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
|
||||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
</configSections>
|
</configSections>
|
||||||
<startup>
|
<startup>
|
||||||
@ -34,10 +34,5 @@
|
|||||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
|
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
|
||||||
</providers>
|
</providers>
|
||||||
</entityFramework>
|
</entityFramework>
|
||||||
<system.data>
|
|
||||||
<DbProviderFactories>
|
|
||||||
<remove invariant="System.Data.SQLite.EF6" />
|
|
||||||
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
|
|
||||||
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
|
|
||||||
</system.data>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -1,58 +1,27 @@
|
|||||||
using System.Linq;
|
using System;
|
||||||
using System.Net;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using SQLite.Net;
|
using Interfaces;
|
||||||
using SQLite.Net.Platform.Win32;
|
|
||||||
|
|
||||||
namespace WindowsDataCenter
|
namespace WindowsDataCenter
|
||||||
{
|
{
|
||||||
[RoutePrefix("api/cards")]
|
[RoutePrefix("api/cards")]
|
||||||
public class CardsController : ApiController
|
public class CardsController : ApiController
|
||||||
{
|
{
|
||||||
private const int UNASSIGNED_CARD_USER_ID = -1;
|
private readonly IRepository _repo;
|
||||||
private readonly SQLiteConnection _connection;
|
public CardsController(IRepository repo)
|
||||||
private string path = "flexitimedb.db";
|
|
||||||
public CardsController()
|
|
||||||
{
|
{
|
||||||
if (_connection == null)
|
if(repo == null) throw new ArgumentNullException(nameof(repo));
|
||||||
{
|
|
||||||
_connection = new SQLiteConnection(new SQLitePlatformWin32(), path);
|
_repo = repo;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("unassigned")]
|
[Route("unassigned")]
|
||||||
public IHttpActionResult GetUnassignedCards()
|
public IHttpActionResult GetUnassignedCards()
|
||||||
{
|
{
|
||||||
var cardQuery = _connection.Query<CardUniqueId>(
|
var unassignedCards = _repo.GetUnassignedIdentifierList();
|
||||||
"select * from CardUniqueId where UserId_FK=?",
|
|
||||||
UNASSIGNED_CARD_USER_ID);
|
|
||||||
|
|
||||||
return Ok(cardQuery.Select(x => new {x.Id, x.UserId_FK, x.CardUId, IsSelected = false}));
|
return Ok(unassignedCards);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[Route("create")]
|
|
||||||
public IHttpActionResult CreateNewCardEntry([FromBody] CardUniqueId card)
|
|
||||||
{
|
|
||||||
card.UserId_FK = -1;
|
|
||||||
var affectedRows = _connection.Insert(card);
|
|
||||||
return
|
|
||||||
ResponseMessage(new HttpResponseMessage(HttpStatusCode.Created)
|
|
||||||
{
|
|
||||||
Content = new StringContent(card.Id.ToString())
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("get")]
|
|
||||||
public IHttpActionResult GetAllCardData()
|
|
||||||
{
|
|
||||||
var cards = _connection.Query<CardUniqueId>(
|
|
||||||
"select * from CardUniqueId");
|
|
||||||
return Json(cards);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14,9 +14,6 @@ using Microsoft.Owin.Hosting;
|
|||||||
using Ninject;
|
using Ninject;
|
||||||
using Ninject.Syntax;
|
using Ninject.Syntax;
|
||||||
using Ninject.Web.Common;
|
using Ninject.Web.Common;
|
||||||
using SQLite.Net;
|
|
||||||
using SQLite.Net.Attributes;
|
|
||||||
using SQLite.Net.Platform.Win32;
|
|
||||||
|
|
||||||
namespace WindowsDataCenter
|
namespace WindowsDataCenter
|
||||||
{
|
{
|
||||||
@ -31,10 +28,6 @@ namespace WindowsDataCenter
|
|||||||
private bool _stopMainWorkerThread;
|
private bool _stopMainWorkerThread;
|
||||||
private Thread _mainWorkerThread;
|
private Thread _mainWorkerThread;
|
||||||
|
|
||||||
public IKernel _kernel;
|
|
||||||
|
|
||||||
private SQLiteConnection _dbConnection;
|
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
OnStart(new string[] {});
|
OnStart(new string[] {});
|
||||||
@ -47,14 +40,10 @@ namespace WindowsDataCenter
|
|||||||
|
|
||||||
protected override void OnStart(string[] args)
|
protected override void OnStart(string[] args)
|
||||||
{
|
{
|
||||||
_dbConnection = new SQLiteConnection(new SQLitePlatformWin32(), "flexitimedb.db");
|
|
||||||
|
|
||||||
//initialise ninject kernel.
|
//initialise ninject kernel.
|
||||||
NinjectHelper.GetInstance(_dbConnection);
|
NinjectHelper.GetInstance(_dbConnection);
|
||||||
|
|
||||||
_dbConnection.CreateTable<CardUniqueId>();
|
|
||||||
_dbConnection.CreateTable<UserIdentity>();
|
|
||||||
_dbConnection.CreateTable<TimeLog>();
|
|
||||||
|
|
||||||
_mainWorkerThread = new Thread(MainWorkerThread)
|
_mainWorkerThread = new Thread(MainWorkerThread)
|
||||||
{
|
{
|
||||||
@ -86,58 +75,4 @@ namespace WindowsDataCenter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class CardUniqueId
|
|
||||||
{
|
|
||||||
[PrimaryKey, AutoIncrement]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public int UserId_FK { get; set; }
|
|
||||||
public string CardUId { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class UserIdentity
|
|
||||||
{
|
|
||||||
[PrimaryKey, AutoIncrement]
|
|
||||||
public int Id { get; set; }
|
|
||||||
//public string CardUId { get; set; }
|
|
||||||
public string FirstName { get; set; }
|
|
||||||
public string LastName { get; set; }
|
|
||||||
public float HoursPerWeek { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class TimeLog
|
|
||||||
{
|
|
||||||
[PrimaryKey, AutoIncrement]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public int UserId_FK { get; set; }
|
|
||||||
public bool InOut { get; set; }
|
|
||||||
public DateTimeOffset SwipeEventDateTime { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class UserObject
|
|
||||||
{
|
|
||||||
public UserObject()
|
|
||||||
{
|
|
||||||
AssociatedCards = new List<CardData>();
|
|
||||||
}
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string FirstName { get; set; }
|
|
||||||
public string LastName { get; set; }
|
|
||||||
public float HoursPerWeek { get; set; }
|
|
||||||
public List<CardData> AssociatedCards { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class UserList
|
|
||||||
{
|
|
||||||
public UserList()
|
|
||||||
{
|
|
||||||
Users = new List<UserObject>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int UserCount { get; set; }
|
|
||||||
public int PageSize { get; set; }
|
|
||||||
public int CurrentPageNumber { get; set; }
|
|
||||||
public List<UserObject> Users { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,58 +1,60 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.Web.Http.Results;
|
using Interfaces;
|
||||||
using SQLite.Net;
|
|
||||||
|
|
||||||
namespace WindowsDataCenter
|
namespace WindowsDataCenter
|
||||||
{
|
{
|
||||||
[RoutePrefix("api/swipedata")]
|
[RoutePrefix("api/swipedata")]
|
||||||
public class SwipeDataController : ApiController
|
public class SwipeDataController : ApiController
|
||||||
{
|
{
|
||||||
private SQLiteConnection _connection;
|
//private SQLiteConnection _connection;
|
||||||
|
private readonly IRepository _repo;
|
||||||
public SwipeDataController(SQLiteConnection conn)
|
public SwipeDataController(IRepository repo)
|
||||||
{
|
{
|
||||||
_connection = conn;
|
if(repo == null) throw new ArgumentNullException();
|
||||||
|
_repo = repo;
|
||||||
|
//_connection = conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("")]
|
[Route("")]
|
||||||
public IHttpActionResult PostData([FromBody] CardData cData)
|
public IHttpActionResult PostData([FromBody] CardData cData)
|
||||||
{
|
{
|
||||||
var cardIdQuery = _connection.Query<CardUniqueId>(
|
//var cardIdQuery = _connection.Query<CardUniqueId>(
|
||||||
"select * from CardUniqueIds where CardUId = ?",
|
// "select * from CardUniqueIds where CardUId = ?",
|
||||||
cData.CardUId);
|
// cData.CardUId);
|
||||||
|
|
||||||
var userId = 0;
|
//var userId = 0;
|
||||||
if (!cardIdQuery.Any())
|
//if (!cardIdQuery.Any())
|
||||||
{
|
//{
|
||||||
//new card, create it!
|
// //new card, create it!
|
||||||
userId = _connection.Insert(new CardUniqueId()
|
// userId = _connection.Insert(new CardUniqueId()
|
||||||
{
|
// {
|
||||||
UserId_FK = -1,
|
// UserId_FK = -1,
|
||||||
CardUId = cData.CardUId
|
// CardUId = cData.CardUId
|
||||||
});
|
// });
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
//TODO: handle when more than one comes back. should NEVER happen but....
|
// //TODO: handle when more than one comes back. should NEVER happen but....
|
||||||
userId = cardIdQuery.First().UserId_FK;
|
// userId = cardIdQuery.First().UserId_FK;
|
||||||
}
|
//}
|
||||||
|
|
||||||
var timeLog = new TimeLog
|
//var timeLog = new TimeLog
|
||||||
{
|
//{
|
||||||
SwipeEventDateTime = DateTime.UtcNow,
|
// SwipeEventDateTime = DateTime.UtcNow,
|
||||||
UserId_FK = userId
|
// UserId_FK = userId
|
||||||
};
|
//};
|
||||||
|
|
||||||
var tLogId = _connection.Insert(timeLog);
|
//var tLogId = _connection.Insert(timeLog);
|
||||||
|
//TODO: TEST
|
||||||
|
_repo.LogEventTime(new Identifier {UniqueId = cData.CardUId});
|
||||||
return
|
return
|
||||||
ResponseMessage(new HttpResponseMessage(HttpStatusCode.OK)
|
ResponseMessage(new HttpResponseMessage(HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
Content = new StringContent(tLogId.ToString())
|
Content = new StringContent("TODO: return ID")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,183 +1,61 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using SQLite.Net;
|
using Interfaces;
|
||||||
using SQLite.Net.Platform.Win32;
|
|
||||||
|
|
||||||
namespace WindowsDataCenter
|
namespace WindowsDataCenter
|
||||||
{
|
{
|
||||||
[RoutePrefix("api/users")]
|
[RoutePrefix("api/users")]
|
||||||
public class UsersController : ApiController
|
public class UsersController : ApiController
|
||||||
{
|
{
|
||||||
private readonly SQLiteConnection _connection;
|
private readonly IRepository _repo;
|
||||||
private string path = "flexitimedb.db";
|
|
||||||
public UsersController()
|
public UsersController(IRepository repo)
|
||||||
{
|
{
|
||||||
if (_connection == null)
|
if(repo == null) { throw new ArgumentNullException(nameof(repo));}
|
||||||
{
|
_repo = repo;
|
||||||
_connection = new SQLiteConnection(new SQLitePlatformWin32(), path);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("")]
|
[Route("")]
|
||||||
public IHttpActionResult GetUsers([FromUri] int pageSize = -1, [FromUri] int pageNumber =-1)
|
public IHttpActionResult GetUsers([FromUri] int pageSize = -1, [FromUri] int pageNumber =-1)
|
||||||
{
|
{
|
||||||
var ret = new UserList
|
var userList = _repo.GetUsers();
|
||||||
{
|
|
||||||
PageSize = pageSize,
|
|
||||||
CurrentPageNumber = pageNumber
|
|
||||||
};
|
|
||||||
//get the complete list of users.
|
|
||||||
var users = _connection.Query<UserIdentity>(
|
|
||||||
"select * from UserIdentity");
|
|
||||||
|
|
||||||
if (!users.Any()) return Ok(ret);
|
var msg = Request.CreateResponse(HttpStatusCode.OK, userList);
|
||||||
|
|
||||||
ret.UserCount = users.Count;
|
return ResponseMessage(msg);
|
||||||
foreach (var user in users)
|
|
||||||
{
|
|
||||||
var userObj = ChangeToUserObject(user);
|
|
||||||
var cards = _connection.Query<CardUniqueId>(
|
|
||||||
"select CardUId from CardUniqueId where UserId_FK = ?",
|
|
||||||
user.Id);
|
|
||||||
foreach (var card in cards)
|
|
||||||
{
|
|
||||||
userObj.AssociatedCards.Add(new CardData { CardUId = card.CardUId });
|
|
||||||
}
|
|
||||||
ret.Users.Add(userObj);
|
|
||||||
}
|
|
||||||
return Ok(ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("{id:int}")]
|
[Route("{id:int}")]
|
||||||
public IHttpActionResult GetUserDetails(int id)
|
public IHttpActionResult GetUserDetails(int id)
|
||||||
{
|
{
|
||||||
var ret = new UserObject();
|
var ret = _repo.GetUser(id);
|
||||||
|
|
||||||
var users = _connection.Query<UserIdentity>(
|
|
||||||
"select * from UserIdentity where Id=?",
|
|
||||||
id);
|
|
||||||
|
|
||||||
if (!users.Any()) return Ok(ret);
|
|
||||||
|
|
||||||
var user = users.First();
|
|
||||||
ret = ChangeToUserObject(user);
|
|
||||||
var cards = _connection.Query<CardUniqueId>(
|
|
||||||
"select CardUId from CardUniqueId where UserId_FK = ?",
|
|
||||||
user.Id);
|
|
||||||
|
|
||||||
foreach (var card in cards)
|
|
||||||
{
|
|
||||||
ret.AssociatedCards.Add(new CardData { CardUId = card.CardUId });
|
|
||||||
}
|
|
||||||
return Ok(ret);
|
return Ok(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("create")]
|
[Route("create")]
|
||||||
public IHttpActionResult CreateUser([FromBody] UserObject user)
|
public IHttpActionResult CreateUser([FromBody] User user)
|
||||||
{
|
{
|
||||||
//var userId = _connection.Insert(user);
|
_repo.UpdateUser(user);
|
||||||
List<int> cardIds = new List<int>();
|
return ResponseMessage(new HttpResponseMessage(HttpStatusCode.OK) {Content = new StringContent("unknownIdTODO")});
|
||||||
foreach (var card in user.AssociatedCards)
|
|
||||||
{
|
|
||||||
var existingCard = _connection.Query<CardUniqueId>(
|
|
||||||
"select Id from CardUniqueId where CardUId = ?", card.CardUId);
|
|
||||||
if (!existingCard.Any())
|
|
||||||
{
|
|
||||||
var cardInsert = new CardUniqueId {CardUId = card.CardUId, UserId_FK = -1};
|
|
||||||
_connection.Insert(cardInsert);
|
|
||||||
cardIds.Add(cardInsert.Id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cardIds.Add(existingCard.First().Id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int userId;
|
|
||||||
var userQuery = _connection.Query<UserIdentity>(
|
|
||||||
"select * from UserIdentity where FirstName = ? AND LastName = ?",
|
|
||||||
user.FirstName, user.LastName);
|
|
||||||
|
|
||||||
if (userQuery.Any())
|
|
||||||
{
|
|
||||||
userId = userQuery.First().Id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var userInsert = new UserIdentity
|
|
||||||
{
|
|
||||||
FirstName = user.FirstName,
|
|
||||||
LastName = user.LastName,
|
|
||||||
HoursPerWeek = user.HoursPerWeek
|
|
||||||
};
|
|
||||||
_connection.Insert(userInsert);
|
|
||||||
userId = userInsert.Id;
|
|
||||||
}
|
|
||||||
foreach (var cardId in cardIds)
|
|
||||||
{
|
|
||||||
_connection.Query<CardUniqueId>(
|
|
||||||
"update CardUniqueId set UserId_FK=? where Id=?",
|
|
||||||
userId, cardId);
|
|
||||||
}
|
|
||||||
return ResponseMessage(new HttpResponseMessage(HttpStatusCode.OK) {Content = new StringContent(userId.ToString())});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("edit")]
|
[Route("edit")]
|
||||||
public IHttpActionResult EditUser([FromBody] UserObject user)
|
public IHttpActionResult EditUser([FromBody] User user)
|
||||||
{
|
{
|
||||||
var users = _connection.Query<UserIdentity>(
|
_repo.UpdateUser(user);
|
||||||
"select * from UserIdentity where Id = ?",
|
|
||||||
user.Id);
|
|
||||||
|
|
||||||
int userId;
|
|
||||||
if (!users.Any())
|
|
||||||
{
|
|
||||||
//create the new user in the DB.
|
|
||||||
var userI = ChangeToUserIdentity(user);
|
|
||||||
userId = _connection.Insert(userI);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
userId = users.First().Id;
|
|
||||||
_connection.Query<UserIdentity>(
|
|
||||||
"update UserIdentity set FirstName=?, LastName=?, HoursPerWeek=? where Id=?",
|
|
||||||
user.FirstName, user.LastName, user.HoursPerWeek, user.Id);
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
ResponseMessage(new HttpResponseMessage(HttpStatusCode.Created)
|
ResponseMessage(new HttpResponseMessage(HttpStatusCode.Created)
|
||||||
{
|
{
|
||||||
Content = new StringContent(userId.ToString())
|
Content = new StringContent("TODO:return UserID")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private UserIdentity ChangeToUserIdentity(UserObject user)
|
|
||||||
{
|
|
||||||
return new UserIdentity
|
|
||||||
{
|
|
||||||
Id = user.Id,
|
|
||||||
FirstName = user.FirstName,
|
|
||||||
LastName = user.LastName,
|
|
||||||
HoursPerWeek = user.HoursPerWeek
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private UserObject ChangeToUserObject(UserIdentity user)
|
|
||||||
{
|
|
||||||
return new UserObject
|
|
||||||
{
|
|
||||||
Id = user.Id,
|
|
||||||
FirstName = user.FirstName,
|
|
||||||
LastName = user.LastName,
|
|
||||||
HoursPerWeek = user.HoursPerWeek
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//TODO: desperately need to create a Repository/Unit Of Work to handle the db stuff.
|
|
||||||
}
|
}
|
||||||
@ -35,14 +35,6 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@ -75,33 +67,9 @@
|
|||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SQLite.Net, Version=3.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SQLite.Net.Platform.Generic, Version=3.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SQLite.Net.Platform.Win32, Version=3.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\SQLite.Net-PCL.3.1.1\lib\net4\SQLite.Net.Platform.Win32.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.104.0\lib\net451\System.Data.SQLite.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite.EF6, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.104.0\lib\net451\System.Data.SQLite.EF6.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite.Linq, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.104.0\lib\net451\System.Data.SQLite.Linq.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@ -154,14 +122,17 @@
|
|||||||
<Content Include="sqlite3.def" />
|
<Content Include="sqlite3.def" />
|
||||||
<Content Include="sqlite3.dll" />
|
<Content Include="sqlite3.dll" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Interfaces\Interfaces.csproj">
|
||||||
|
<Project>{B7347B72-E208-423A-9D99-723B558EA3D7}</Project>
|
||||||
|
<Name>Interfaces</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\SQLiteRepository\SQLiteRepository.csproj">
|
||||||
|
<Project>{B3510C81-F069-48A2-B826-EBE0CE7AB0B2}</Project>
|
||||||
|
<Name>SQLiteRepository</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="EntityFramework" version="6.0.0" targetFramework="net452" />
|
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net452" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net452" />
|
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net452" />
|
||||||
@ -13,10 +12,4 @@
|
|||||||
<package id="Ninject.Web.Common" version="3.2.0.0" targetFramework="net452" />
|
<package id="Ninject.Web.Common" version="3.2.0.0" targetFramework="net452" />
|
||||||
<package id="Ninject.Web.WebApi" version="3.2.4.0" targetFramework="net452" />
|
<package id="Ninject.Web.WebApi" version="3.2.4.0" targetFramework="net452" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net452" />
|
<package id="Owin" version="1.0" targetFramework="net452" />
|
||||||
<package id="SQLite.Net.Core-PCL" version="3.1.1" targetFramework="net452" />
|
|
||||||
<package id="SQLite.Net-PCL" version="3.1.1" targetFramework="net452" />
|
|
||||||
<package id="System.Data.SQLite" version="1.0.104.0" targetFramework="net452" />
|
|
||||||
<package id="System.Data.SQLite.Core" version="1.0.104.0" targetFramework="net452" />
|
|
||||||
<package id="System.Data.SQLite.EF6" version="1.0.104.0" targetFramework="net452" />
|
|
||||||
<package id="System.Data.SQLite.Linq" version="1.0.104.0" targetFramework="net452" />
|
|
||||||
</packages>
|
</packages>
|
||||||
Loading…
Reference in New Issue
Block a user