From PetaPoco to NPoco (#1207)
* NPoco - 2.x (builds) * NPoco - v3.1 (does not build) * NPoco - builds * NPoco - configure database factory (tests fail) * Pick fix from 7.4 * NPoco - stock v3.1 - sort-of working * NPoco - fix merge * Fix Newtonsoft.Json in web.Template.Debug.config * NPoco - fix SELECT * * NPoco - fixing repositories * NPoco - fix EntityRepository * NPoco - fix EntityRepository * NPoco - cosmetic * NPoco - use 3.1.0-u001 from github/zpqrtbnk/NPoco * Fixes build, NPoco needed to be referenced in the cms and UmbracoExamine projects * Fixes lots of tests * fixes more tests * NPoco - bugfixing * Bugfix CacheHelper in tests * Bugfix connection mocking in tests * NPoco - inject database in Sql.Select<> * NPoco - discovery retry policy only once * Enable C# 6 for Umbraco.Core * NPoco - introduce UmbracoSql, cleanup * NPoco - more cleanup and fixing * NPoco - fix UserRepository * Optimize InGroupsOf * Implement UmbracoDatabase.FetchByGroups * NPoco - fix Select * NPoco - simplify GetPagedResultsByQuery * Cherry-pick DisableBrowserCacheAttribute fix from 7.4 * Upgrade NPoco to use Sql<TContext> * U4-8257 - cleanup relators * 4-8257 - cleanup more relators * Upgrade NPoco with more OOTB version * fixes a couple tests, changes double check lock to Lazy<T>
This commit is contained in:
committed by
Shannon Deminick
parent
1b8747bd6d
commit
365a01a476
@@ -8,6 +8,7 @@ using System.Threading;
|
||||
using System.Web;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
@@ -244,10 +245,10 @@ namespace Umbraco.Core.Sync
|
||||
//
|
||||
// FIXME not true if we're running on a background thread, assuming we can?
|
||||
|
||||
var sql = new Sql().Select("*")
|
||||
.From<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax)
|
||||
.Where<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax, dto => dto.Id > _lastId)
|
||||
.OrderBy<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax, dto => dto.Id);
|
||||
var sql = _appContext.DatabaseContext.Sql().SelectAll()
|
||||
.From<CacheInstructionDto>()
|
||||
.Where<CacheInstructionDto>(dto => dto.Id > _lastId)
|
||||
.OrderBy<CacheInstructionDto>(dto => dto.Id);
|
||||
|
||||
var dtos = _appContext.DatabaseContext.Database.Fetch<CacheInstructionDto>(sql);
|
||||
if (dtos.Count <= 0) return;
|
||||
@@ -348,9 +349,9 @@ namespace Umbraco.Core.Sync
|
||||
/// and it should instead cold-boot.</remarks>
|
||||
private void EnsureInstructions()
|
||||
{
|
||||
var sql = new Sql().Select("*")
|
||||
.From<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax)
|
||||
.Where<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax, dto => dto.Id == _lastId);
|
||||
var sql = _appContext.DatabaseContext.Sql().SelectAll()
|
||||
.From<CacheInstructionDto>()
|
||||
.Where<CacheInstructionDto>(dto => dto.Id == _lastId);
|
||||
|
||||
var dtos = _appContext.DatabaseContext.Database.Fetch<CacheInstructionDto>(sql);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user