1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Upgraded services to latest version of Petapoco

This commit is contained in:
kay.one 2012-02-17 14:04:22 -08:00
parent ba43509a67
commit 04afa21b98
14 changed files with 3223 additions and 17 deletions

View File

@ -1,8 +1,8 @@
using NzbDrone.Services.Service.Datastore;
using PetaPoco;
using Microsoft.Web.Infrastructure.DynamicModuleHelper;
using Ninject;
using Ninject.Web.Mvc;
using Services.PetaPoco;
[assembly: WebActivator.PreApplicationStartMethod(typeof(NzbDrone.Services.Service.App_Start.NinjectMVC3), "Start")]
[assembly: WebActivator.ApplicationShutdownMethodAttribute(typeof(NzbDrone.Services.Service.App_Start.NinjectMVC3), "Stop")]

View File

@ -3,7 +3,7 @@
using System.Web.Mvc;
using NzbDrone.Common;
using NzbDrone.Core.Datastore.Migrations;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Controllers
{

View File

@ -5,7 +5,7 @@
using NzbDrone.Common;
using NzbDrone.Common.Contract;
using NzbDrone.Services.Service.Repository.Reporting;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Controllers
@ -42,7 +42,7 @@ public JsonResult ParseError(ParseErrorReport parseErrorReport)
private bool ParseErrorExists(string title)
{
return _database.Exists<ParseErrorRow>("WHERE Title = @0", title);
return _database.Exists<ParseErrorRow>(title);
}
[HttpPost]
@ -61,12 +61,12 @@ public JsonResult ReportException(ExceptionReport exceptionReport)
return Json(OK);
}
catch(Exception)
catch (Exception)
{
logger.Trace(exceptionReport.NullCheck());
throw;
}
}
}
}

View File

@ -1,7 +1,10 @@
using System.Configuration;
using System;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using NzbDrone.Services.Service.Migrations;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Datastore
{
@ -16,7 +19,7 @@ public static IDatabase GetPetaPocoDb()
{
MigrationsHelper.Run(GetConnectionString);
var db = new Database("SqlExpress")
{
KeepConnectionAlive = true,

View File

@ -110,6 +110,7 @@
<ItemGroup>
<Compile Include="App_Start\Logging.cs" />
<Compile Include="App_Start\NinjectMVC3.cs" />
<Compile Include="Services.PetaPoco.cs" />
<Compile Include="Datastore\Connection.cs" />
<Compile Include="Controllers\DailySeriesController.cs" />
<Compile Include="Controllers\HealthController.cs" />

View File

@ -3,7 +3,7 @@
using System.Linq;
using System.Web;
using NzbDrone.Services.Service.Repository;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Providers
{

View File

@ -3,7 +3,7 @@
using System.Linq;
using System.Web;
using NzbDrone.Services.Service.Repository;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Providers
{

View File

@ -2,7 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Repository
{

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Repository
{

View File

@ -1,5 +1,5 @@
using System.Linq;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Repository.Reporting
{

View File

@ -1,9 +1,11 @@
using System.Linq;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Repository.Reporting
{
[TableName("ParseErrorReports")]
[PrimaryKey("Title", autoIncrement = false)]
public class ParseErrorRow : ReportRowBase
{
public string Title { get; set; }

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Service.Repository
{

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,8 @@
using NzbDrone.Services.Service.Migrations;
using NzbDrone.Test.Common;
using NzbDrone.Test.Common.AutoMoq;
using PetaPoco;
using Services.PetaPoco;
namespace NzbDrone.Services.Tests.Framework
{