updated nuget

This commit is contained in:
Luke Pulverenti 2013-07-07 01:41:28 -04:00
parent e3690b2ddd
commit 16b58256c4
5 changed files with 17 additions and 25 deletions

View File

@ -4,7 +4,7 @@ namespace MediaBrowser.Model.Notifications
{
public class NotificationQuery
{
public Guid? UserId { get; set; }
public Guid UserId { get; set; }
public bool? IsRead { get; set; }

View File

@ -78,13 +78,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
/// <returns>NotificationResult.</returns>
public NotificationResult GetNotifications(NotificationQuery query)
{
var whereClause = string.Empty;
var result = new NotificationResult();
using (var cmd = _connection.CreateCommand())
{
if (query.IsRead.HasValue || query.UserId.HasValue)
{
var clauses = new List<string>();
@ -94,14 +90,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
cmd.Parameters.Add(cmd, "@IsRead", DbType.Boolean).Value = query.IsRead.Value;
}
if (query.UserId.HasValue)
{
clauses.Add("UserId=@UserId");
cmd.Parameters.Add(cmd, "@UserId", DbType.Guid).Value = query.UserId.Value;
}
cmd.Parameters.Add(cmd, "@UserId", DbType.Guid).Value = query.UserId;
whereClause = " where " + string.Join(" And ", clauses.ToArray());
}
var whereClause = " where " + string.Join(" And ", clauses.ToArray());
cmd.CommandText = string.Format("select count(Id) from Notifications{0};select Id,UserId,Date,Name,Description,Url,Level,IsRead,Category,RelatedId from Notifications{0} order by IsRead asc, Date desc", whereClause);

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.139</version>
<version>3.0.140</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.139" />
<dependency id="MediaBrowser.Common" version="3.0.140" />
<dependency id="NLog" version="2.0.1.2" />
<dependency id="ServiceStack.Text" version="3.9.45" />
<dependency id="SimpleInjector" version="2.2.3" />

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
<version>3.0.139</version>
<version>3.0.140</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.139</version>
<version>3.0.140</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.139" />
<dependency id="MediaBrowser.Common" version="3.0.140" />
</dependencies>
</metadata>
<files>