suspect service1 file incomplete due to selected line commits.
Added sqlite references. added new CardsController, SwipeDataController and UsersController classes which all pull in SQLite to retrieve, or store their data.
This commit is contained in:
parent
3579f750cc
commit
a892e1d2c8
@ -1,6 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<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" />
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="v13.0" />
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
|
||||
</providers>
|
||||
</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>
|
||||
@ -0,0 +1,7 @@
|
||||
namespace WindowsDataCenter
|
||||
{
|
||||
public class CardData
|
||||
{
|
||||
public string CardUId { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using SQLite.Net;
|
||||
using SQLite.Net.Platform.Win32;
|
||||
|
||||
namespace WindowsDataCenter
|
||||
{
|
||||
[RoutePrefix("api/cards")]
|
||||
public class CardsController : ApiController
|
||||
{
|
||||
private const int UNASSIGNED_CARD_USER_ID = -1;
|
||||
private readonly SQLiteConnection _connection;
|
||||
private string path = "flexitimedb.db";
|
||||
public CardsController()
|
||||
{
|
||||
if (_connection == null)
|
||||
{
|
||||
_connection = new SQLiteConnection(new SQLitePlatformWin32(), path);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("unassigned")]
|
||||
public IHttpActionResult GetUnassignedCards()
|
||||
{
|
||||
var cardQuery = _connection.Query<CardUniqueId>(
|
||||
"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}));
|
||||
}
|
||||
|
||||
[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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -4,15 +4,16 @@ using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using System.Web;
|
||||
using System.Web.Http.Dependencies;
|
||||
using Microsoft.Owin.Hosting;
|
||||
using Owin;
|
||||
using SQLite.Net;
|
||||
using SQLite.Net.Attributes;
|
||||
using SQLite.Net.Platform.Win32;
|
||||
|
||||
namespace WindowsDataCenter
|
||||
{
|
||||
@ -27,6 +28,10 @@ namespace WindowsDataCenter
|
||||
private bool _stopMainWorkerThread;
|
||||
private Thread _mainWorkerThread;
|
||||
|
||||
public IKernel _kernel;
|
||||
|
||||
private SQLiteConnection _dbConnection;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
OnStart(new string[] {});
|
||||
@ -39,6 +44,15 @@ namespace WindowsDataCenter
|
||||
|
||||
protected override void OnStart(string[] args)
|
||||
{
|
||||
_dbConnection = new SQLiteConnection(new SQLitePlatformWin32(), "flexitimedb.db");
|
||||
|
||||
//initialise ninject kernel.
|
||||
NinjectHelper.GetInstance(_dbConnection);
|
||||
|
||||
_dbConnection.CreateTable<CardUniqueId>();
|
||||
_dbConnection.CreateTable<UserIdentity>();
|
||||
_dbConnection.CreateTable<TimeLog>();
|
||||
|
||||
_mainWorkerThread = new Thread(MainWorkerThread)
|
||||
{
|
||||
IsBackground = false,
|
||||
@ -69,15 +83,61 @@ 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; }
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Results;
|
||||
using SQLite.Net;
|
||||
|
||||
namespace WindowsDataCenter
|
||||
{
|
||||
[RoutePrefix("api/swipedata")]
|
||||
public class SwipeDataController : ApiController
|
||||
{
|
||||
private SQLiteConnection _connection;
|
||||
|
||||
public SwipeDataController(SQLiteConnection conn)
|
||||
{
|
||||
_connection = conn;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("")]
|
||||
public IHttpActionResult PostData([FromBody] CardData cData)
|
||||
{
|
||||
var cardIdQuery = _connection.Query<CardUniqueId>(
|
||||
"select * from CardUniqueIds where CardUId = ?",
|
||||
cData.CardUId);
|
||||
|
||||
var userId = 0;
|
||||
if (!cardIdQuery.Any())
|
||||
{
|
||||
//new card, create it!
|
||||
userId = _connection.Insert(new CardUniqueId()
|
||||
{
|
||||
UserId_FK = -1,
|
||||
CardUId = cData.CardUId
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: handle when more than one comes back. should NEVER happen but....
|
||||
userId = cardIdQuery.First().UserId_FK;
|
||||
}
|
||||
|
||||
var timeLog = new TimeLog
|
||||
{
|
||||
SwipeEventDateTime = DateTime.UtcNow,
|
||||
UserId_FK = userId
|
||||
};
|
||||
|
||||
var tLogId = _connection.Insert(timeLog);
|
||||
return
|
||||
ResponseMessage(new HttpResponseMessage(HttpStatusCode.OK)
|
||||
{
|
||||
Content = new StringContent(tLogId.ToString())
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,183 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using SQLite.Net;
|
||||
using SQLite.Net.Platform.Win32;
|
||||
|
||||
namespace WindowsDataCenter
|
||||
{
|
||||
[RoutePrefix("api/users")]
|
||||
public class UsersController : ApiController
|
||||
{
|
||||
private readonly SQLiteConnection _connection;
|
||||
private string path = "flexitimedb.db";
|
||||
public UsersController()
|
||||
{
|
||||
if (_connection == null)
|
||||
{
|
||||
_connection = new SQLiteConnection(new SQLitePlatformWin32(), path);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("")]
|
||||
public IHttpActionResult GetUsers([FromUri] int pageSize = -1, [FromUri] int pageNumber =-1)
|
||||
{
|
||||
var ret = new UserList
|
||||
{
|
||||
PageSize = pageSize,
|
||||
CurrentPageNumber = pageNumber
|
||||
};
|
||||
//get the complete list of users.
|
||||
var users = _connection.Query<UserIdentity>(
|
||||
"select * from UserIdentity");
|
||||
|
||||
if (!users.Any()) return Ok(ret);
|
||||
|
||||
ret.UserCount = users.Count;
|
||||
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]
|
||||
[Route("{id:int}")]
|
||||
public IHttpActionResult GetUserDetails(int id)
|
||||
{
|
||||
var ret = new UserObject();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("create")]
|
||||
public IHttpActionResult CreateUser([FromBody] UserObject user)
|
||||
{
|
||||
//var userId = _connection.Insert(user);
|
||||
List<int> cardIds = new List<int>();
|
||||
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]
|
||||
[Route("edit")]
|
||||
public IHttpActionResult EditUser([FromBody] UserObject user)
|
||||
{
|
||||
var users = _connection.Query<UserIdentity>(
|
||||
"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
|
||||
ResponseMessage(new HttpResponseMessage(HttpStatusCode.Created)
|
||||
{
|
||||
Content = new StringContent(userId.ToString())
|
||||
});
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
@ -12,6 +12,8 @@
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -33,32 +35,68 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Owin, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
<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="Microsoft.Owin.Host.HttpListener, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.2.0.2\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||
<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.Hosting, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||
<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>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Hosting, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</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.ComponentModel.DataAnnotations" />
|
||||
<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">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@ -76,6 +114,9 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CardData.cs" />
|
||||
<Compile Include="CardsController.cs" />
|
||||
<Compile Include="JsonpFormatter.cs" />
|
||||
<Compile Include="RestService_Get.cs" />
|
||||
<Compile Include="RestService_Post.cs" />
|
||||
<Compile Include="Service1.cs">
|
||||
@ -86,12 +127,27 @@
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="StartOwin.cs" />
|
||||
<Compile Include="SwipeDataController.cs" />
|
||||
<Compile Include="UsersController.cs" />
|
||||
<Compile Include="ValuesController.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="sqlite3.def" />
|
||||
<Content Include="sqlite3.dll" />
|
||||
</ItemGroup>
|
||||
<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.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@ -1,12 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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.Core" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin" version="2.0.2" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin.Host.HttpListener" version="2.0.2" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin.Hosting" version="2.0.2" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" 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>
|
||||
@ -1,6 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Loading…
Reference in New Issue
Block a user