Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion src/Libraries/SmartStore.Core/Async/AsyncRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Hosting;
using Microsoft.AspNetCore.Hosting;
using Autofac;
using SmartStore.Core.Infrastructure;

Expand Down
6 changes: 3 additions & 3 deletions src/Libraries/SmartStore.Core/Async/LocalAsyncState.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ο»Ώusing System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Caching;
using Microsoft.Extensions.Caching.Memory;
using System.Threading;

namespace SmartStore.Core.Async
Expand Down Expand Up @@ -60,7 +60,7 @@ public virtual void Set<T>(T state, string name = null, bool neverExpires = fals
{
// add new entry
var duration = neverExpires ? TimeSpan.Zero : TimeSpan.FromMinutes(15);
var policy = new CacheItemPolicy
var policy = new MemoryCacheEntryOptions
{
SlidingExpiration = duration,
Priority = CacheItemPriority.NotRemovable
Expand Down Expand Up @@ -155,7 +155,7 @@ public virtual void SetCancelTokenSource<T>(CancellationTokenSource cancelTokenS
OnRemoveCancelTokenSource(key);
}

var policy = new CacheItemPolicy { Priority = CacheItemPriority.NotRemovable };
var policy = new MemoryCacheEntryOptions { Priority = CacheItemPriority.NotRemovable };

_cancelTokens.Set(key, cancelTokenSource, policy);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Libraries/SmartStore.Core/Caching/MemoryCacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Caching;
using Microsoft.Extensions.Caching.Memory;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading;
Expand Down Expand Up @@ -136,7 +136,7 @@ public async Task<T> GetAsync<T>(string key, Func<Task<T>> acquirer, TimeSpan? d

public void Put(string key, object value, TimeSpan? duration = null, IEnumerable<string> dependencies = null)
{
_cache.Set(key, value ?? FakeNull, GetCacheItemPolicy(duration, dependencies));
_cache.Set(key, value ?? FakeNull, GetMemoryCacheEntryOptions(duration, dependencies));
}

public bool Contains(string key)
Expand Down Expand Up @@ -207,7 +207,7 @@ public virtual ISet GetHashSet(string key, Func<IEnumerable<string>> acquirer =
return result;
}

private CacheItemPolicy GetCacheItemPolicy(TimeSpan? duration, IEnumerable<string> dependencies)
private MemoryCacheEntryOptions GetMemoryCacheEntryOptions(TimeSpan? duration, IEnumerable<string> dependencies)
{
var absoluteExpiration = ObjectCache.InfiniteAbsoluteExpiration;

Expand All @@ -216,7 +216,7 @@ private CacheItemPolicy GetCacheItemPolicy(TimeSpan? duration, IEnumerable<strin
absoluteExpiration = DateTime.UtcNow + duration.Value;
}

var cacheItemPolicy = new CacheItemPolicy
var cacheItemPolicy = new MemoryCacheEntryOptions
{
AbsoluteExpiration = absoluteExpiration,
SlidingExpiration = ObjectCache.NoSlidingExpiration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Dynamic;
using System.Globalization;
using System.Web.Routing;
using Microsoft.AspNetCore.Routing;
using SmartStore.Utilities;

namespace SmartStore.ComponentModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Dynamic;
using System.Web.Routing;
using Microsoft.AspNetCore.Routing;
using Newtonsoft.Json.Linq;
using SmartStore.Core.Domain.Catalog;
using SmartStore.Core.Domain.Shipping;
Expand Down
1 change: 0 additions & 1 deletion src/Libraries/SmartStore.Core/Data/DataSettings.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ο»Ώusing System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data.SqlServerCe;
using System.IO;
using System.Linq;
using System.Threading;
Expand Down
8 changes: 4 additions & 4 deletions src/Libraries/SmartStore.Core/Data/Hooks/HookedEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface IHookedEntity
/// <summary>
/// Gets the hooked entity entry
/// </summary>
DbEntityEntry Entry { get; }
EntityEntry Entry { get; }

/// <summary>
/// Gets the hooked entity instance
Expand Down Expand Up @@ -61,12 +61,12 @@ public class HookedEntity : IHookedEntity
{
private Type _entityType;

public HookedEntity(IDbContext context, DbEntityEntry entry)
public HookedEntity(IDbContext context, EntityEntry entry)
: this(context.GetType(), entry)
{
}

internal HookedEntity(Type contextType, DbEntityEntry entry)
internal HookedEntity(Type contextType, EntityEntry entry)
{
ContextType = contextType;
Entry = entry;
Expand All @@ -78,7 +78,7 @@ public Type ContextType
get;
}

public DbEntityEntry Entry
public EntityEntry Entry
{
get;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/SmartStore.Core/Data/IDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.Entity;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;

namespace SmartStore.Core.Data
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/SmartStore.Core/Data/IDbContextExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ο»Ώusing System;
using System.Collections.Generic;
using System.Data.Entity;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using System.Linq.Expressions;
using SmartStore.Core;
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/SmartStore.Core/Data/IQueryableExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ο»Ώusing System;
using System.Data.Entity;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using System.Linq.Expressions;
using SmartStore.Core;
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/SmartStore.Core/Data/RepositoryExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ο»Ώusing System;
using System.Collections.Generic;
using System.Data.Entity;
using Microsoft.EntityFrameworkCore;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq.Expressions;
Expand Down
1 change: 0 additions & 1 deletion src/Libraries/SmartStore.Core/Domain/Blogs/BlogPost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ public static IReadOnlyCollection<string> GetVisibilityAffectingPropertyNames()
/// Gets or sets a language identifier for which the blog post should be displayed.
/// </summary>
[DataMember]
[Index]
public int? LanguageId { get; set; }

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/Libraries/SmartStore.Core/Domain/Catalog/Category.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ public partial class Category : BaseEntity, ICategoryNode, IAuditable, ISoftDele
/// <summary>
/// Gets or sets a value indicating whether the entity has been deleted
/// </summary>
[Index]
public bool Deleted { get; set; }

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Libraries/SmartStore.Core/Domain/Catalog/Manufacturer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public partial class Manufacturer : BaseEntity, IAuditable, ISoftDeletable, ILoc
/// Gets or sets a value indicating whether the entity is subject to ACL.
/// </summary>
[DataMember]
[Index]
public bool SubjectToAcl { get; set; }

/// <summary>
Expand All @@ -121,7 +120,6 @@ public partial class Manufacturer : BaseEntity, IAuditable, ISoftDeletable, ILoc
/// <summary>
/// Gets or sets a value indicating whether the entity has been deleted
/// </summary>
[Index]
public bool Deleted { get; set; }

/// <summary>
Expand Down
10 changes: 0 additions & 10 deletions src/Libraries/SmartStore.Core/Domain/Catalog/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public static IReadOnlyCollection<string> GetVisibilityAffectingPropertyNames()
/// Gets or sets the visibility level of the product.
/// </summary>
[DataMember]
[Index]
public ProductVisibility Visibility { get; set; }

/// <summary>
Expand Down Expand Up @@ -216,7 +215,6 @@ public string Sku
/// Gets or sets the manufacturer part number
/// </summary>
[DataMember]
[Index]
public string ManufacturerPartNumber
{
[DebuggerStepThrough]
Expand All @@ -228,7 +226,6 @@ public string ManufacturerPartNumber
/// Gets or sets the Global Trade Item Number (GTIN). These identifiers include UPC (in North America), EAN (in Europe), JAN (in Japan), and ISBN (for books).
/// </summary>
[DataMember]
[Index]
public string Gtin
{
[DebuggerStepThrough]
Expand Down Expand Up @@ -669,30 +666,23 @@ public decimal Height
/// Gets or sets a value indicating whether the entity is published
/// </summary>
[DataMember]
[Index("IX_Product_Published_Deleted_IsSystemProduct", 1)]
public bool Published { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the entity has been deleted
/// </summary>
[Index]
[Index("IX_Product_Published_Deleted_IsSystemProduct", 2)]
public bool Deleted { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the entity is a system product.
/// </summary>
[DataMember]
[Index]
[Index("IX_Product_SystemName_IsSystemProduct", 2)]
[Index("IX_Product_Published_Deleted_IsSystemProduct", 3)]
public bool IsSystemProduct { get; set; }

/// <summary>
/// Gets or sets the product system name.
/// </summary>
[DataMember]
[Index("IX_Product_SystemName_IsSystemProduct", 1)]
public string SystemName { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ public partial class ProductAttribute : BaseEntity, ILocalizedEntity, ISearchAli
/// Gets or sets whether the attribute can be filtered
/// </summary>
[DataMember]
[Index]
public bool AllowFiltering { get; set; }

/// <summary>
/// Gets or sets the display order
/// </summary>
[DataMember]
[Index]
public int DisplayOrder { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public partial class ProductCategory : BaseEntity
/// Gets or sets a value indicating whether the product is featured
/// </summary>
[DataMember]
[Index]
public bool IsFeaturedProduct { get; set; }

/// <summary>
Expand All @@ -38,7 +37,6 @@ public partial class ProductCategory : BaseEntity
/// Indicates whether the mapping is created by the user or by the system.
/// </summary>
[DataMember]
[Index]
public bool IsSystemMapping { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public partial class ProductManufacturer : BaseEntity
/// Gets or sets a value indicating whether the product is featured
/// </summary>
[DataMember]
[Index]
public bool IsFeaturedProduct { get; set; }

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/Libraries/SmartStore.Core/Domain/Catalog/ProductTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public partial class ProductTag : BaseEntity, ILocalizedEntity
/// Gets or sets a value indicating whether the entity is published.
/// </summary>
[DataMember]
[Index("IX_ProductTag_Published")]
public bool Published { get; set; } = true;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public partial class ProductVariantAttribute : BaseEntity, ILocalizedEntity
/// Gets or sets the product identifier
/// </summary>
[DataMember]
[Index("IX_Product_ProductAttribute_Mapping_ProductId_DisplayOrder", 1)]
public int ProductId { get; set; }

/// <summary>
Expand Down Expand Up @@ -51,14 +50,12 @@ public partial class ProductVariantAttribute : BaseEntity, ILocalizedEntity
/// Gets or sets the attribute control type identifier
/// </summary>
[DataMember]
[Index]
public int AttributeControlTypeId { get; set; }

/// <summary>
/// Gets or sets the display order
/// </summary>
[DataMember]
[Index("IX_Product_ProductAttribute_Mapping_ProductId_DisplayOrder", 2)]
public int DisplayOrder { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ public partial class ProductVariantAttributeCombination : BaseEntity
/// Gets or sets the stock quantity
/// </summary>
[DataMember]
[Index("IX_StockQuantity_AllowOutOfStockOrders", 1)]
public int StockQuantity { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to allow orders when out of stock
/// </summary>
[DataMember]
[Index("IX_StockQuantity_AllowOutOfStockOrders", 2)]
public bool AllowOutOfStockOrders { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public partial class ProductVariantAttributeValue : BaseEntity, ILocalizedEntity
/// Gets or sets the product variant attribute mapping identifier
/// </summary>
[DataMember]
[Index("IX_ProductVariantAttributeValue_ProductVariantAttributeId_DisplayOrder", 1)]
public int ProductVariantAttributeId { get; set; }

/// <summary>
Expand All @@ -28,7 +27,6 @@ public partial class ProductVariantAttributeValue : BaseEntity, ILocalizedEntity
/// Gets or sets the product variant attribute name
/// </summary>
[DataMember]
[Index]
public string Name { get; set; }

/// <summary>
Expand Down Expand Up @@ -65,14 +63,12 @@ public partial class ProductVariantAttributeValue : BaseEntity, ILocalizedEntity
/// Gets or sets the display order
/// </summary>
[DataMember]
[Index("IX_ProductVariantAttributeValue_ProductVariantAttributeId_DisplayOrder", 2)]
public int DisplayOrder { get; set; }

/// <summary>
/// Gets or sets the type Id
/// </summary>
[DataMember]
[Index]
public int ValueTypeId { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ public ProductVariantAttributeCombination()
public string Sku { get; set; }

[DataMember]
[Index]
public string Gtin { get; set; }

[DataMember]
[Index]
public string ManufacturerPartNumber { get; set; }

[DataMember]
Expand Down Expand Up @@ -61,7 +59,6 @@ public ProductVariantAttributeCombination()
public virtual QuantityUnit QuantityUnit { get; set; }

[DataMember]
[Index]
public bool IsActive { get; set; }
//public bool IsDefaultCombination { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public partial class SpecificationAttribute : BaseEntity, ILocalizedEntity, ISea
/// Gets or sets whether the specification attribute can be filtered. Only effective in accordance with MegaSearchPlus plugin.
/// </summary>
[DataMember]
[Index]
public bool AllowFiltering { get; set; }

/// <summary>
Expand Down
Loading