Upgraded services to latest version of Petapoco

pull/19/head
kay.one 13 years ago
parent ba43509a67
commit 04afa21b98

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

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

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

@ -1,7 +1,10 @@
using System.Configuration; using System;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq; using System.Linq;
using NzbDrone.Services.Service.Migrations; using NzbDrone.Services.Service.Migrations;
using PetaPoco; using Services.PetaPoco;
namespace NzbDrone.Services.Service.Datastore namespace NzbDrone.Services.Service.Datastore
{ {

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save