Version listing fix

This commit is contained in:
Thomas Hounsell 2015-11-15 23:51:36 +00:00
parent 74a0e83ea8
commit 438b16d556
4 changed files with 17 additions and 14 deletions

View File

@ -105,16 +105,16 @@
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop"> <Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Bson, Version=2.1.0.145, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Bson, Version=2.1.1.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.1.0\lib\net45\MongoDB.Bson.dll</HintPath> <HintPath>..\packages\MongoDB.Bson.2.1.1\lib\net45\MongoDB.Bson.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="MongoDB.Driver, Version=2.1.0.145, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Driver, Version=2.1.1.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.1.0\lib\net45\MongoDB.Driver.dll</HintPath> <HintPath>..\packages\MongoDB.Driver.2.1.1\lib\net45\MongoDB.Driver.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.1.0.145, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Driver.Core, Version=2.1.1.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.1.0\lib\net45\MongoDB.Driver.Core.dll</HintPath> <HintPath>..\packages\MongoDB.Driver.Core.2.1.1\lib\net45\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

View File

@ -39,7 +39,8 @@ public async Task<List<BuildModel>> SelectInVersionOrder(int limit, int skip)
[DataObjectMethod(DataObjectMethodType.Select, false)] [DataObjectMethod(DataObjectMethodType.Select, false)]
public async Task<List<BuildModel>> SelectVersion(int major, int minor, int skip, int limit) public async Task<List<BuildModel>> SelectVersion(int major, int minor, int skip, int limit)
{ {
return await _buildCollection.Find(b => b.MajorVersion == major && b.MinorVersion == minor) byte bMajor = Convert.ToByte(major), bMinor = Convert.ToByte(minor);
var test = await _buildCollection.Find(Builders<BuildModel>.Filter.And(Builders<BuildModel>.Filter.Eq(b => b.MajorVersion, bMajor), Builders<BuildModel>.Filter.Eq(b => b.MinorVersion, bMinor)))
.SortByDescending(b => b.BuildTime) .SortByDescending(b => b.BuildTime)
.ThenByDescending(b => b.MajorVersion) .ThenByDescending(b => b.MajorVersion)
.ThenByDescending(b => b.MinorVersion) .ThenByDescending(b => b.MinorVersion)
@ -48,6 +49,7 @@ public async Task<List<BuildModel>> SelectVersion(int major, int minor, int skip
.Skip(skip) .Skip(skip)
.Limit(limit) .Limit(limit)
.ToListAsync(); .ToListAsync();
return test;
} }
[DataObjectMethod(DataObjectMethodType.Select, false)] [DataObjectMethod(DataObjectMethodType.Select, false)]
@ -75,7 +77,8 @@ t.Minor descending
[DataObjectMethod(DataObjectMethodType.Select, false)] [DataObjectMethod(DataObjectMethodType.Select, false)]
public async Task<long> SelectVersionCount(int major, int minor) public async Task<long> SelectVersionCount(int major, int minor)
{ {
return await _buildCollection.Find(b => b.MajorVersion == major && b.MinorVersion == minor) byte bMajor = Convert.ToByte(major), bMinor = Convert.ToByte(minor);
return await _buildCollection.Find(Builders<BuildModel>.Filter.And(Builders<BuildModel>.Filter.Eq(b => b.MajorVersion, bMajor), Builders<BuildModel>.Filter.Eq(b => b.MinorVersion, bMinor)))
.CountAsync(); .CountAsync();
} }
} }

View File

@ -1363,9 +1363,9 @@ interface JQuery {
/** /**
* Set the value of each element in the set of matched elements. * Set the value of each element in the set of matched elements.
* *
* @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked. * @param value A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked.
*/ */
val(value: string|string[]): JQuery; val(value: string|string[]|number): JQuery;
/** /**
* Set the value of each element in the set of matched elements. * Set the value of each element in the set of matched elements.
* *

View File

@ -7,7 +7,7 @@
<package id="Glimpse.Mvc5" version="1.5.3" targetFramework="net46" /> <package id="Glimpse.Mvc5" version="1.5.3" targetFramework="net46" />
<package id="Humanizer" version="1.37.7" targetFramework="net46" /> <package id="Humanizer" version="1.37.7" targetFramework="net46" />
<package id="jQuery" version="2.1.4" targetFramework="net452" /> <package id="jQuery" version="2.1.4" targetFramework="net452" />
<package id="jquery.TypeScript.DefinitelyTyped" version="2.3.2" targetFramework="net46" /> <package id="jquery.TypeScript.DefinitelyTyped" version="2.3.3" targetFramework="net46" />
<package id="jQuery.Validation" version="1.14.0" targetFramework="net46" /> <package id="jQuery.Validation" version="1.14.0" targetFramework="net46" />
<package id="jsrender.TypeScript.DefinitelyTyped" version="0.0.3" targetFramework="net45" /> <package id="jsrender.TypeScript.DefinitelyTyped" version="0.0.3" targetFramework="net45" />
<package id="Microsoft.ApplicationInsights" version="1.2.3" targetFramework="net46" /> <package id="Microsoft.ApplicationInsights" version="1.2.3" targetFramework="net46" />
@ -30,9 +30,9 @@
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" /> <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /> <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="MongoDB.Bson" version="2.1.0" targetFramework="net46" /> <package id="MongoDB.Bson" version="2.1.1" targetFramework="net46" />
<package id="MongoDB.Driver" version="2.1.0" targetFramework="net46" /> <package id="MongoDB.Driver" version="2.1.1" targetFramework="net46" />
<package id="MongoDB.Driver.Core" version="2.1.0" targetFramework="net46" /> <package id="MongoDB.Driver.Core" version="2.1.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
<package id="routedebugger" version="2.1.4.0" targetFramework="net45" /> <package id="routedebugger" version="2.1.4.0" targetFramework="net45" />
<package id="WebGrease" version="1.6.0" targetFramework="net45" /> <package id="WebGrease" version="1.6.0" targetFramework="net45" />