diff --git a/src/Libraries/SmartStore.Core/Async/LocalAsyncState.cs b/src/Libraries/SmartStore.Core/Async/LocalAsyncState.cs index ba66c15bf0..026978c927 100644 --- a/src/Libraries/SmartStore.Core/Async/LocalAsyncState.cs +++ b/src/Libraries/SmartStore.Core/Async/LocalAsyncState.cs @@ -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 diff --git a/src/Libraries/SmartStore.Core/Caching/MemoryCacheManager.cs b/src/Libraries/SmartStore.Core/Caching/MemoryCacheManager.cs index 332b199c61..69046e5ba0 100644 --- a/src/Libraries/SmartStore.Core/Caching/MemoryCacheManager.cs +++ b/src/Libraries/SmartStore.Core/Caching/MemoryCacheManager.cs @@ -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; diff --git a/src/Libraries/SmartStore.Core/Caching/RequestCache.cs b/src/Libraries/SmartStore.Core/Caching/RequestCache.cs index 601afc2fef..1f3f412927 100644 --- a/src/Libraries/SmartStore.Core/Caching/RequestCache.cs +++ b/src/Libraries/SmartStore.Core/Caching/RequestCache.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using System.Web; +using Microsoft.AspNetCore.Http; using SmartStore.Utilities; namespace SmartStore.Core.Caching diff --git a/src/Libraries/SmartStore.Core/Collections/Querystring.cs b/src/Libraries/SmartStore.Core/Collections/Querystring.cs index 84de3dd797..65ac786e47 100644 --- a/src/Libraries/SmartStore.Core/Collections/Querystring.cs +++ b/src/Libraries/SmartStore.Core/Collections/Querystring.cs @@ -1,7 +1,7 @@ using System.Collections.Specialized; using System.Diagnostics.CodeAnalysis; using System.Text; -using System.Web; +using Microsoft.AspNetCore.Http; using SmartStore.Utilities.ObjectPools; namespace SmartStore.Collections diff --git a/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/DictionaryConverter.cs b/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/DictionaryConverter.cs index d94b7933e7..c0d97937dd 100644 --- a/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/DictionaryConverter.cs +++ b/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/DictionaryConverter.cs @@ -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 diff --git a/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/TypeConverterFactory.cs b/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/TypeConverterFactory.cs index 4db9fd8d90..a0fdbd9e9d 100644 --- a/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/TypeConverterFactory.cs +++ b/src/Libraries/SmartStore.Core/ComponentModel/TypeConversion/TypeConverterFactory.cs @@ -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; diff --git a/src/Libraries/SmartStore.Core/Data/Hooks/HookedEntity.cs b/src/Libraries/SmartStore.Core/Data/Hooks/HookedEntity.cs index 11a9944a32..6cfb831bdc 100644 --- a/src/Libraries/SmartStore.Core/Data/Hooks/HookedEntity.cs +++ b/src/Libraries/SmartStore.Core/Data/Hooks/HookedEntity.cs @@ -14,7 +14,7 @@ public interface IHookedEntity /// /// Gets the hooked entity entry /// - DbEntityEntry Entry { get; } + EntityEntry Entry { get; } /// /// Gets the hooked entity instance @@ -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; @@ -78,7 +78,7 @@ public Type ContextType get; } - public DbEntityEntry Entry + public EntityEntry Entry { get; } diff --git a/src/Libraries/SmartStore.Core/Data/IDbContext.cs b/src/Libraries/SmartStore.Core/Data/IDbContext.cs index 95224e0308..5044fca160 100644 --- a/src/Libraries/SmartStore.Core/Data/IDbContext.cs +++ b/src/Libraries/SmartStore.Core/Data/IDbContext.cs @@ -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 diff --git a/src/Libraries/SmartStore.Core/Data/IDbContextExtensions.cs b/src/Libraries/SmartStore.Core/Data/IDbContextExtensions.cs index 430f4eabee..789a28b615 100644 --- a/src/Libraries/SmartStore.Core/Data/IDbContextExtensions.cs +++ b/src/Libraries/SmartStore.Core/Data/IDbContextExtensions.cs @@ -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; diff --git a/src/Libraries/SmartStore.Core/Data/IQueryableExtensions.cs b/src/Libraries/SmartStore.Core/Data/IQueryableExtensions.cs index dc5a3eed3e..67173d80eb 100644 --- a/src/Libraries/SmartStore.Core/Data/IQueryableExtensions.cs +++ b/src/Libraries/SmartStore.Core/Data/IQueryableExtensions.cs @@ -1,5 +1,5 @@ using System; -using System.Data.Entity; +using Microsoft.EntityFrameworkCore; using System.Linq; using System.Linq.Expressions; using SmartStore.Core; diff --git a/src/Libraries/SmartStore.Core/Data/RepositoryExtensions.cs b/src/Libraries/SmartStore.Core/Data/RepositoryExtensions.cs index 1fefc75eb2..f8cfc5e28a 100644 --- a/src/Libraries/SmartStore.Core/Data/RepositoryExtensions.cs +++ b/src/Libraries/SmartStore.Core/Data/RepositoryExtensions.cs @@ -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; diff --git a/src/Libraries/SmartStore.Core/Domain/Blogs/BlogPost.cs b/src/Libraries/SmartStore.Core/Domain/Blogs/BlogPost.cs index 821d502963..c433f51a65 100644 --- a/src/Libraries/SmartStore.Core/Domain/Blogs/BlogPost.cs +++ b/src/Libraries/SmartStore.Core/Domain/Blogs/BlogPost.cs @@ -167,7 +167,6 @@ public static IReadOnlyCollection GetVisibilityAffectingPropertyNames() /// Gets or sets a language identifier for which the blog post should be displayed. /// [DataMember] - [Index] public int? LanguageId { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/Category.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/Category.cs index f0364da897..5d760ef767 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/Category.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/Category.cs @@ -173,7 +173,6 @@ public partial class Category : BaseEntity, ICategoryNode, IAuditable, ISoftDele /// /// Gets or sets a value indicating whether the entity has been deleted /// - [Index] public bool Deleted { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/Manufacturer.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/Manufacturer.cs index 68ec18111c..22d4205361 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/Manufacturer.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/Manufacturer.cs @@ -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. /// [DataMember] - [Index] public bool SubjectToAcl { get; set; } /// @@ -121,7 +120,6 @@ public partial class Manufacturer : BaseEntity, IAuditable, ISoftDeletable, ILoc /// /// Gets or sets a value indicating whether the entity has been deleted /// - [Index] public bool Deleted { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/Product.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/Product.cs index 06abbb9bbf..eff2b49bb4 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/Product.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/Product.cs @@ -90,7 +90,6 @@ public static IReadOnlyCollection GetVisibilityAffectingPropertyNames() /// Gets or sets the visibility level of the product. /// [DataMember] - [Index] public ProductVisibility Visibility { get; set; } /// @@ -216,7 +215,6 @@ public string Sku /// Gets or sets the manufacturer part number /// [DataMember] - [Index] public string ManufacturerPartNumber { [DebuggerStepThrough] @@ -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). /// [DataMember] - [Index] public string Gtin { [DebuggerStepThrough] @@ -669,30 +666,23 @@ public decimal Height /// Gets or sets a value indicating whether the entity is published /// [DataMember] - [Index("IX_Product_Published_Deleted_IsSystemProduct", 1)] public bool Published { get; set; } /// /// Gets or sets a value indicating whether the entity has been deleted /// - [Index] - [Index("IX_Product_Published_Deleted_IsSystemProduct", 2)] public bool Deleted { get; set; } /// /// Gets or sets a value indicating whether the entity is a system product. /// [DataMember] - [Index] - [Index("IX_Product_SystemName_IsSystemProduct", 2)] - [Index("IX_Product_Published_Deleted_IsSystemProduct", 3)] public bool IsSystemProduct { get; set; } /// /// Gets or sets the product system name. /// [DataMember] - [Index("IX_Product_SystemName_IsSystemProduct", 1)] public string SystemName { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductAttribute.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductAttribute.cs index 9043816b92..271ad124f1 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductAttribute.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductAttribute.cs @@ -37,14 +37,12 @@ public partial class ProductAttribute : BaseEntity, ILocalizedEntity, ISearchAli /// Gets or sets whether the attribute can be filtered /// [DataMember] - [Index] public bool AllowFiltering { get; set; } /// /// Gets or sets the display order /// [DataMember] - [Index] public int DisplayOrder { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductCategory.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductCategory.cs index 1d027e15b4..84c9c4f4e3 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductCategory.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductCategory.cs @@ -25,7 +25,6 @@ public partial class ProductCategory : BaseEntity /// Gets or sets a value indicating whether the product is featured /// [DataMember] - [Index] public bool IsFeaturedProduct { get; set; } /// @@ -38,7 +37,6 @@ public partial class ProductCategory : BaseEntity /// Indicates whether the mapping is created by the user or by the system. /// [DataMember] - [Index] public bool IsSystemMapping { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductManufacturer.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductManufacturer.cs index 88babcda90..22aafb82c4 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductManufacturer.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductManufacturer.cs @@ -25,7 +25,6 @@ public partial class ProductManufacturer : BaseEntity /// Gets or sets a value indicating whether the product is featured /// [DataMember] - [Index] public bool IsFeaturedProduct { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductTag.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductTag.cs index ace86b58ef..0c18987c40 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductTag.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductTag.cs @@ -23,7 +23,6 @@ public partial class ProductTag : BaseEntity, ILocalizedEntity /// Gets or sets a value indicating whether the entity is published. /// [DataMember] - [Index("IX_ProductTag_Published")] public bool Published { get; set; } = true; /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttribute.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttribute.cs index 44f6a4885e..3d18477b8e 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttribute.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttribute.cs @@ -18,7 +18,6 @@ public partial class ProductVariantAttribute : BaseEntity, ILocalizedEntity /// Gets or sets the product identifier /// [DataMember] - [Index("IX_Product_ProductAttribute_Mapping_ProductId_DisplayOrder", 1)] public int ProductId { get; set; } /// @@ -51,14 +50,12 @@ public partial class ProductVariantAttribute : BaseEntity, ILocalizedEntity /// Gets or sets the attribute control type identifier /// [DataMember] - [Index] public int AttributeControlTypeId { get; set; } /// /// Gets or sets the display order /// [DataMember] - [Index("IX_Product_ProductAttribute_Mapping_ProductId_DisplayOrder", 2)] public int DisplayOrder { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeCombination.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeCombination.cs index d3199afd8c..39025e8cc2 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeCombination.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeCombination.cs @@ -24,14 +24,12 @@ public partial class ProductVariantAttributeCombination : BaseEntity /// Gets or sets the stock quantity /// [DataMember] - [Index("IX_StockQuantity_AllowOutOfStockOrders", 1)] public int StockQuantity { get; set; } /// /// Gets or sets a value indicating whether to allow orders when out of stock /// [DataMember] - [Index("IX_StockQuantity_AllowOutOfStockOrders", 2)] public bool AllowOutOfStockOrders { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeValue.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeValue.cs index 7804a7f972..81853a7c6d 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeValue.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/ProductVariantAttributeValue.cs @@ -15,7 +15,6 @@ public partial class ProductVariantAttributeValue : BaseEntity, ILocalizedEntity /// Gets or sets the product variant attribute mapping identifier /// [DataMember] - [Index("IX_ProductVariantAttributeValue_ProductVariantAttributeId_DisplayOrder", 1)] public int ProductVariantAttributeId { get; set; } /// @@ -28,7 +27,6 @@ public partial class ProductVariantAttributeValue : BaseEntity, ILocalizedEntity /// Gets or sets the product variant attribute name /// [DataMember] - [Index] public string Name { get; set; } /// @@ -65,14 +63,12 @@ public partial class ProductVariantAttributeValue : BaseEntity, ILocalizedEntity /// Gets or sets the display order /// [DataMember] - [Index("IX_ProductVariantAttributeValue_ProductVariantAttributeId_DisplayOrder", 2)] public int DisplayOrder { get; set; } /// /// Gets or sets the type Id /// [DataMember] - [Index] public int ValueTypeId { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/SmartStoreProductVariantAttributeCombination.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/SmartStoreProductVariantAttributeCombination.cs index 9b3a3c6463..e30a6eb201 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/SmartStoreProductVariantAttributeCombination.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/SmartStoreProductVariantAttributeCombination.cs @@ -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] @@ -61,7 +59,6 @@ public ProductVariantAttributeCombination() public virtual QuantityUnit QuantityUnit { get; set; } [DataMember] - [Index] public bool IsActive { get; set; } //public bool IsDefaultCombination { get; set; } diff --git a/src/Libraries/SmartStore.Core/Domain/Catalog/SpecificationAttribute.cs b/src/Libraries/SmartStore.Core/Domain/Catalog/SpecificationAttribute.cs index f867f81ff7..d74ce5f850 100644 --- a/src/Libraries/SmartStore.Core/Domain/Catalog/SpecificationAttribute.cs +++ b/src/Libraries/SmartStore.Core/Domain/Catalog/SpecificationAttribute.cs @@ -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. /// [DataMember] - [Index] public bool AllowFiltering { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Cms/MenuItemRecord.cs b/src/Libraries/SmartStore.Core/Domain/Cms/MenuItemRecord.cs index 90fc7610e9..01d0ac59f0 100644 --- a/src/Libraries/SmartStore.Core/Domain/Cms/MenuItemRecord.cs +++ b/src/Libraries/SmartStore.Core/Domain/Cms/MenuItemRecord.cs @@ -27,7 +27,6 @@ public class MenuItemRecord : BaseEntity, ILocalizedEntity, IStoreMappingSupport /// /// Gets or sets the parent menu item identifier. 0 if the item has no parent. /// - [Index("IX_MenuItem_ParentItemId")] public int ParentItemId { get; set; } /// @@ -63,13 +62,11 @@ public class MenuItemRecord : BaseEntity, ILocalizedEntity, IStoreMappingSupport /// /// Gets or sets a value indicating whether the menu item is published. /// - [Index("IX_MenuItem_Published")] public bool Published { get; set; } = true; /// /// Gets or sets the display order. /// - [Index("IX_MenuItem_DisplayOrder")] public int DisplayOrder { get; set; } /// @@ -125,13 +122,11 @@ public class MenuItemRecord : BaseEntity, ILocalizedEntity, IStoreMappingSupport /// /// Gets or sets a value indicating whether the entity is limited/restricted to certain stores. /// - [Index("IX_MenuItem_LimitedToStores")] public bool LimitedToStores { get; set; } /// /// Gets or sets a value indicating whether the entity is subject to ACL. /// - [Index("IX_MenuItem_SubjectToAcl")] public bool SubjectToAcl { get; set; } } } diff --git a/src/Libraries/SmartStore.Core/Domain/Cms/MenuRecord.cs b/src/Libraries/SmartStore.Core/Domain/Cms/MenuRecord.cs index 19dfe6e581..5e09e49181 100644 --- a/src/Libraries/SmartStore.Core/Domain/Cms/MenuRecord.cs +++ b/src/Libraries/SmartStore.Core/Domain/Cms/MenuRecord.cs @@ -35,7 +35,6 @@ public virtual ICollection Items /// /// Gets or sets the value indicating whether this menu is deleteable by a user. /// - [Index("IX_Menu_SystemName_IsSystemMenu", Order = 1)] public bool IsSystemMenu { get; set; } /// @@ -59,7 +58,6 @@ public virtual ICollection Items /// /// Gets or sets a value indicating whether the menu is published. /// - [Index("IX_Menu_Published")] public bool Published { get; set; } = true; /// @@ -70,13 +68,11 @@ public virtual ICollection Items /// /// Gets or sets a value indicating whether the entity is limited/restricted to certain stores. /// - [Index("IX_Menu_LimitedToStores")] public bool LimitedToStores { get; set; } /// /// Gets or sets a value indicating whether the entity is subject to ACL. /// - [Index("IX_Menu_SubjectToAcl")] public bool SubjectToAcl { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Customers/Customer.cs b/src/Libraries/SmartStore.Core/Domain/Customers/Customer.cs index c0582bce24..6616c3405a 100644 --- a/src/Libraries/SmartStore.Core/Domain/Customers/Customer.cs +++ b/src/Libraries/SmartStore.Core/Domain/Customers/Customer.cs @@ -105,23 +105,18 @@ public PasswordFormat PasswordFormat /// /// Gets or sets a value indicating whether the customer has been deleted /// - [Index] - [Index("IX_Customer_Deleted_IsSystemAccount", 1)] public bool Deleted { get; set; } /// /// Gets or sets a value indicating whether the customer account is system /// [DataMember] - [Index] - [Index("IX_Customer_Deleted_IsSystemAccount", 2)] public bool IsSystemAccount { get; set; } /// /// Gets or sets the customer system name /// [DataMember] - [Index] public string SystemName { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRole.cs b/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRole.cs index f5f8e96436..6d20871c2e 100644 --- a/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRole.cs +++ b/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRole.cs @@ -43,23 +43,18 @@ public partial class CustomerRole : BaseEntity, IRulesContainer /// Gets or sets a value indicating whether the customer role is active /// [DataMember] - [Index] public bool Active { get; set; } /// /// Gets or sets a value indicating whether the customer role is system /// [DataMember] - [Index] - [Index("IX_CustomerRole_SystemName_IsSystemRole", 2)] public bool IsSystemRole { get; set; } /// /// Gets or sets the customer role system name /// [DataMember] - [Index] - [Index("IX_CustomerRole_SystemName_IsSystemRole", 1)] public string SystemName { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRoleMapping.cs b/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRoleMapping.cs index 18ff112076..7035fb90f3 100644 --- a/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRoleMapping.cs +++ b/src/Libraries/SmartStore.Core/Domain/Customers/CustomerRoleMapping.cs @@ -26,7 +26,6 @@ public partial class CustomerRoleMapping : BaseEntity /// Indicates whether the mapping is created by the user or by the system. /// [DataMember] - [Index] public bool IsSystemMapping { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Customers/WalletHistory.cs b/src/Libraries/SmartStore.Core/Domain/Customers/WalletHistory.cs index 4befa9f0d9..fd0dd77183 100644 --- a/src/Libraries/SmartStore.Core/Domain/Customers/WalletHistory.cs +++ b/src/Libraries/SmartStore.Core/Domain/Customers/WalletHistory.cs @@ -12,7 +12,6 @@ public class WalletHistory : BaseEntity /// /// Gets or sets the store identifier. Should not be zero. /// - [Index("IX_StoreId_CreatedOn", 0)] public int StoreId { get; set; } /// @@ -43,7 +42,6 @@ public class WalletHistory : BaseEntity /// /// Gets or sets the date ehen the entry was created (in UTC). /// - [Index("IX_StoreId_CreatedOn", 1)] public DateTime CreatedOnUtc { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/DataExchange/SyncMapping.cs b/src/Libraries/SmartStore.Core/Domain/DataExchange/SyncMapping.cs index 09230db0a7..b6f31f241c 100644 --- a/src/Libraries/SmartStore.Core/Domain/DataExchange/SyncMapping.cs +++ b/src/Libraries/SmartStore.Core/Domain/DataExchange/SyncMapping.cs @@ -20,30 +20,24 @@ public SyncMapping() /// /// Gets or sets the entity identifier in SmartStore /// - [Index("IX_SyncMapping_ByEntity", 0, IsUnique = true)] [DataMember] public int EntityId { get; set; } /// /// Gets or sets the entity's key in the external application /// - [Index("IX_SyncMapping_BySource", 0, IsUnique = true)] [DataMember] public string SourceKey { get; set; } /// /// Gets or sets a name representing the entity type /// - [Index("IX_SyncMapping_ByEntity", 1, IsUnique = true)] - [Index("IX_SyncMapping_BySource", 1, IsUnique = true)] [DataMember] public string EntityName { get; set; } /// /// Gets or sets a name for the external application /// - [Index("IX_SyncMapping_ByEntity", 2, IsUnique = true)] - [Index("IX_SyncMapping_BySource", 2, IsUnique = true)] [DataMember] public string ContextName { get; set; } diff --git a/src/Libraries/SmartStore.Core/Domain/Forums/Forum.cs b/src/Libraries/SmartStore.Core/Domain/Forums/Forum.cs index b4cedb8d01..df8c4cb64c 100644 --- a/src/Libraries/SmartStore.Core/Domain/Forums/Forum.cs +++ b/src/Libraries/SmartStore.Core/Domain/Forums/Forum.cs @@ -13,7 +13,6 @@ public partial class Forum : BaseEntity, IAuditable, ILocalizedEntity, ISlugSupp /// /// Gets or sets the forum group identifier /// - [Index("IX_ForumGroupId_DisplayOrder", Order = 0)] public int ForumGroupId { get; set; } /// @@ -59,7 +58,6 @@ public partial class Forum : BaseEntity, IAuditable, ILocalizedEntity, ISlugSupp /// /// Gets or sets the display order /// - [Index("IX_ForumGroupId_DisplayOrder", Order = 1)] public int DisplayOrder { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Forums/ForumGroup.cs b/src/Libraries/SmartStore.Core/Domain/Forums/ForumGroup.cs index 3b21ddda01..40d82f6dbd 100644 --- a/src/Libraries/SmartStore.Core/Domain/Forums/ForumGroup.cs +++ b/src/Libraries/SmartStore.Core/Domain/Forums/ForumGroup.cs @@ -28,7 +28,6 @@ public partial class ForumGroup : BaseEntity, IAuditable, IStoreMappingSupported /// /// Gets or sets the display order /// - [Index] public int DisplayOrder { get; set; } /// @@ -44,13 +43,11 @@ public partial class ForumGroup : BaseEntity, IAuditable, IStoreMappingSupported /// /// Gets or sets a value indicating whether the entity is limited/restricted to certain stores /// - [Index] public bool LimitedToStores { get; set; } /// /// Gets or sets a value indicating whether the entity is subject to ACL /// - [Index] public bool SubjectToAcl { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Forums/ForumPost.cs b/src/Libraries/SmartStore.Core/Domain/Forums/ForumPost.cs index 3098a9cdc0..1809ec537e 100644 --- a/src/Libraries/SmartStore.Core/Domain/Forums/ForumPost.cs +++ b/src/Libraries/SmartStore.Core/Domain/Forums/ForumPost.cs @@ -35,7 +35,6 @@ public partial class ForumPost : BaseEntity, IAuditable /// /// Gets or sets the date and time of instance creation /// - [Index] public DateTime CreatedOnUtc { get; set; } /// @@ -46,7 +45,6 @@ public partial class ForumPost : BaseEntity, IAuditable /// /// Gets or sets a value indicating whether the entity is published /// - [Index] public bool Published { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Forums/ForumTopic.cs b/src/Libraries/SmartStore.Core/Domain/Forums/ForumTopic.cs index d7059778c1..feecc8ab5b 100644 --- a/src/Libraries/SmartStore.Core/Domain/Forums/ForumTopic.cs +++ b/src/Libraries/SmartStore.Core/Domain/Forums/ForumTopic.cs @@ -12,7 +12,6 @@ public partial class ForumTopic : BaseEntity, IAuditable /// /// Gets or sets the forum identifier /// - [Index("IX_ForumId_Published", Order = 0)] public int ForumId { get; set; } /// @@ -23,19 +22,16 @@ public partial class ForumTopic : BaseEntity, IAuditable /// /// Gets or sets the topic type identifier /// - [Index("IX_TopicTypeId_LastPostTime", Order = 0)] public int TopicTypeId { get; set; } /// /// Gets or sets the subject /// - [Index] public string Subject { get; set; } /// /// Gets or sets the number of posts /// - [Index] public int NumPosts { get; set; } /// @@ -62,13 +58,11 @@ public partial class ForumTopic : BaseEntity, IAuditable /// /// Gets or sets the last post date and time /// - [Index("IX_TopicTypeId_LastPostTime", Order = 1)] public DateTime? LastPostTime { get; set; } /// /// Gets or sets the date and time of instance creation /// - [Index] public DateTime CreatedOnUtc { get; set; } /// @@ -79,7 +73,6 @@ public partial class ForumTopic : BaseEntity, IAuditable /// /// Gets or sets a value indicating whether the entity is published /// - [Index("IX_ForumId_Published", Order = 1)] public bool Published { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Localization/LocalizedProperty.cs b/src/Libraries/SmartStore.Core/Domain/Localization/LocalizedProperty.cs index 521252dd36..e0bc8cd285 100644 --- a/src/Libraries/SmartStore.Core/Domain/Localization/LocalizedProperty.cs +++ b/src/Libraries/SmartStore.Core/Domain/Localization/LocalizedProperty.cs @@ -13,29 +13,24 @@ public partial class LocalizedProperty : BaseEntity /// Gets or sets the entity identifier /// [DataMember] - [Index("IX_LocalizedProperty_Compound", Order = 1)] public int EntityId { get; set; } /// /// Gets or sets the language identifier /// [DataMember] - [Index("IX_LocalizedProperty_Compound", Order = 4)] public int LanguageId { get; set; } /// /// Gets or sets the locale key group /// [DataMember] - [Index("IX_LocalizedProperty_Compound", Order = 3)] - [Index("IX_LocalizedProperty_LocaleKeyGroup")] public string LocaleKeyGroup { get; set; } /// /// Gets or sets the locale key /// [DataMember] - [Index("IX_LocalizedProperty_Compound", Order = 2)] public string LocaleKey { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Logging/Log.cs b/src/Libraries/SmartStore.Core/Domain/Logging/Log.cs index a907f17dfc..d255a58f54 100644 --- a/src/Libraries/SmartStore.Core/Domain/Logging/Log.cs +++ b/src/Libraries/SmartStore.Core/Domain/Logging/Log.cs @@ -15,7 +15,6 @@ public partial class Log : BaseEntity /// /// Gets or sets the log level identifier /// - [Index("IX_Log_Level", IsUnique = false)] public int LogLevelId { get; set; } /// @@ -56,7 +55,6 @@ public partial class Log : BaseEntity /// /// Gets or sets the logger name /// - [Index("IX_Log_Logger", IsUnique = false)] public string Logger { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Media/Download.cs b/src/Libraries/SmartStore.Core/Domain/Media/Download.cs index 95c3a6351e..d601a526ff 100644 --- a/src/Libraries/SmartStore.Core/Domain/Media/Download.cs +++ b/src/Libraries/SmartStore.Core/Domain/Media/Download.cs @@ -15,7 +15,6 @@ public partial class Download : BaseEntity//, ITransient /// Gets or sets a GUID /// [DataMember] - [Index] public Guid DownloadGuid { get; set; } /// @@ -34,14 +33,12 @@ public partial class Download : BaseEntity//, ITransient /// Gets or sets a value indicating whether the entity transient/preliminary /// [DataMember] - [Index("IX_UpdatedOn_IsTransient", 1)] public bool IsTransient { get; set; } /// /// Gets or sets the date and time of instance update /// [DataMember] - [Index("IX_UpdatedOn_IsTransient", 0)] public DateTime UpdatedOnUtc { get; set; } /// @@ -60,14 +57,12 @@ public partial class Download : BaseEntity//, ITransient /// Gets or sets a value indicating the corresponding entity id /// [DataMember] - [Index("IX_EntityId_EntityName", 0)] public int EntityId { get; set; } /// /// Gets or sets a value indicating the corresponding entity name /// [DataMember] - [Index("IX_EntityId_EntityName", 1)] [StringLength(100)] public string EntityName { get; set; } diff --git a/src/Libraries/SmartStore.Core/Domain/Media/MediaFile.cs b/src/Libraries/SmartStore.Core/Domain/Media/MediaFile.cs index 2681666518..4283ead9df 100644 --- a/src/Libraries/SmartStore.Core/Domain/Media/MediaFile.cs +++ b/src/Libraries/SmartStore.Core/Domain/Media/MediaFile.cs @@ -37,13 +37,6 @@ public static IReadOnlyCollection GetOutputAffectingPropertyNames() /// Gets or sets the associated folder identifier. /// [DataMember] - [Index("IX_Media_MediaType", 0)] - [Index("IX_Media_Extension", 0)] - [Index("IX_Media_PixelSize", 0)] - [Index("IX_Media_Name", 0)] - [Index("IX_Media_Size", 0)] - [Index("IX_Media_UpdatedOnUtc", 0)] - [Index("IX_Media_FolderId", 0)] public int? FolderId { get; set; } /// @@ -56,7 +49,6 @@ public static IReadOnlyCollection GetOutputAffectingPropertyNames() /// Gets or sets the SEO friendly name of the media file including file extension /// [DataMember] - [Index("IX_Media_Name", 1)] public string Name { get; set; } /// @@ -75,8 +67,6 @@ public static IReadOnlyCollection GetOutputAffectingPropertyNames() /// Gets or sets the (dotless) file extension /// [DataMember] - [Index("IX_Media_MediaType", 2)] - [Index("IX_Media_Extension", 1)] public string Extension { get; set; } /// @@ -89,23 +79,18 @@ public static IReadOnlyCollection GetOutputAffectingPropertyNames() /// Gets or sets the file media type (image, video, audio, document etc.) /// [DataMember] - [Index("IX_Media_MediaType", 1)] public string MediaType { get; set; } /// /// Gets or sets the file size in bytes /// [DataMember] - [Index("IX_Media_Size", 1)] public int Size { get; set; } /// /// Gets or sets the total pixel size of an image (width * height) /// [DataMember] - [Index("IX_Media_MediaType", 3)] - [Index("IX_Media_Extension", 2)] - [Index("IX_Media_PixelSize", 1)] public int? PixelSize { get; set; } /// @@ -147,13 +132,6 @@ public static IReadOnlyCollection GetOutputAffectingPropertyNames() /// /// Gets or sets a value indicating whether the file has been soft deleted /// - [Index("IX_Media_MediaType", 4)] - [Index("IX_Media_Extension", 3)] - [Index("IX_Media_PixelSize", 2)] - [Index("IX_Media_Name", 2)] - [Index("IX_Media_Size", 2)] - [Index("IX_Media_UpdatedOnUtc", 2)] - [Index("IX_Media_FolderId", 1)] public bool Deleted { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Media/MediaFolder.cs b/src/Libraries/SmartStore.Core/Domain/Media/MediaFolder.cs index 3598c1bb8d..7a025715af 100644 --- a/src/Libraries/SmartStore.Core/Domain/Media/MediaFolder.cs +++ b/src/Libraries/SmartStore.Core/Domain/Media/MediaFolder.cs @@ -14,7 +14,6 @@ public partial class MediaFolder : BaseEntity /// Gets or sets the parent folder id. /// [DataMember] - [Index("IX_NameParentId", Order = 0, IsUnique = true)] public int? ParentId { get; set; } /// @@ -26,7 +25,6 @@ public partial class MediaFolder : BaseEntity /// Gets or sets the media folder name. /// [DataMember] - [Index("IX_NameParentId", Order = 1, IsUnique = true)] public string Name { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Media/MediaTrack.cs b/src/Libraries/SmartStore.Core/Domain/Media/MediaTrack.cs index 359c4c5141..526a7439bb 100644 --- a/src/Libraries/SmartStore.Core/Domain/Media/MediaTrack.cs +++ b/src/Libraries/SmartStore.Core/Domain/Media/MediaTrack.cs @@ -26,7 +26,6 @@ public partial class MediaTrack : BaseEntity, IEquatable /// Gets or sets the media file identifier. /// [DataMember] - [Index("IX_MediaTrack_Composite", IsUnique = true, Order = 0)] public int MediaFileId { get => _mediaFileId; @@ -52,7 +51,6 @@ public int MediaFileId /// Gets or sets the related entity identifier. /// [DataMember] - [Index("IX_MediaTrack_Composite", IsUnique = true, Order = 1)] public int EntityId { get => _entityId; @@ -67,7 +65,6 @@ public int EntityId /// Gets or sets the related entity set name. /// [DataMember] - [Index("IX_MediaTrack_Composite", IsUnique = true, Order = 2)] public string EntityName { get => _entityName; @@ -82,7 +79,6 @@ public string EntityName /// Gets or sets the media file property name in the tracked entity. /// [DataMember] - [Index("IX_MediaTrack_Composite", IsUnique = true, Order = 3)] public string Property { get => _property; diff --git a/src/Libraries/SmartStore.Core/Domain/Messages/MessageTemplate.cs b/src/Libraries/SmartStore.Core/Domain/Messages/MessageTemplate.cs index b15cfc8557..793e38aa6f 100644 --- a/src/Libraries/SmartStore.Core/Domain/Messages/MessageTemplate.cs +++ b/src/Libraries/SmartStore.Core/Domain/Messages/MessageTemplate.cs @@ -1,5 +1,5 @@ using System.ComponentModel.DataAnnotations; -using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; using SmartStore.Core.Domain.Localization; using SmartStore.Core.Domain.Stores; diff --git a/src/Libraries/SmartStore.Core/Domain/Messages/NewsLetterSubscription.cs b/src/Libraries/SmartStore.Core/Domain/Messages/NewsLetterSubscription.cs index 282267126a..69743f9821 100644 --- a/src/Libraries/SmartStore.Core/Domain/Messages/NewsLetterSubscription.cs +++ b/src/Libraries/SmartStore.Core/Domain/Messages/NewsLetterSubscription.cs @@ -20,14 +20,12 @@ public partial class NewsLetterSubscription : BaseEntity /// Gets or sets the subcriber email /// [DataMember] - [Index("IX_NewsletterSubscription_Email_StoreId", 1)] public string Email { get; set; } /// /// Gets or sets a value indicating whether subscription is active /// [DataMember] - [Index] public bool Active { get; set; } /// @@ -40,7 +38,6 @@ public partial class NewsLetterSubscription : BaseEntity /// Gets or sets the store identifier /// [DataMember] - [Index("IX_NewsletterSubscription_Email_StoreId", 2)] public int StoreId { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/News/NewsItem.cs b/src/Libraries/SmartStore.Core/Domain/News/NewsItem.cs index 954961a9b2..0f380e95c4 100644 --- a/src/Libraries/SmartStore.Core/Domain/News/NewsItem.cs +++ b/src/Libraries/SmartStore.Core/Domain/News/NewsItem.cs @@ -130,7 +130,6 @@ public static IReadOnlyCollection GetVisibilityAffectingPropertyNames() /// /// Gets or sets a language identifier for which the news item should be displayed. /// - [Index] public int? LanguageId { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Orders/Order.cs b/src/Libraries/SmartStore.Core/Domain/Orders/Order.cs index d32337103c..0cb3324729 100644 --- a/src/Libraries/SmartStore.Core/Domain/Orders/Order.cs +++ b/src/Libraries/SmartStore.Core/Domain/Orders/Order.cs @@ -440,7 +440,6 @@ protected virtual SortedDictionary ParseTaxRates(string taxRat /// /// Gets or sets a value indicating whether the entity has been deleted /// - [Index] public bool Deleted { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Security/PermissionRecord.cs b/src/Libraries/SmartStore.Core/Domain/Security/PermissionRecord.cs index aa2f64a941..ee88fdccdf 100644 --- a/src/Libraries/SmartStore.Core/Domain/Security/PermissionRecord.cs +++ b/src/Libraries/SmartStore.Core/Domain/Security/PermissionRecord.cs @@ -13,7 +13,6 @@ public class PermissionRecord : BaseEntity /// /// Gets or sets the permission system name. /// - [Index] public string SystemName { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTask.cs b/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTask.cs index bf04b013c6..3edb5ec884 100644 --- a/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTask.cs +++ b/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTask.cs @@ -37,13 +37,11 @@ public class ScheduleTask : BaseEntity, ICloneable /// /// Gets or sets the type of appropriate ITask class /// - [Index("IX_Type")] public string Type { get; set; } /// /// Gets or sets the value indicating whether a task is enabled /// - [Index("IX_NextRun_Enabled", 1)] public bool Enabled { get; set; } /// @@ -56,7 +54,6 @@ public class ScheduleTask : BaseEntity, ICloneable /// public bool StopOnError { get; set; } - [Index("IX_NextRun_Enabled", 0)] public DateTime? NextRunUtc { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTaskHistory.cs b/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTaskHistory.cs index dbf2cbfefb..53b53b742a 100644 --- a/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTaskHistory.cs +++ b/src/Libraries/SmartStore.Core/Domain/Tasks/ScheduleTaskHistory.cs @@ -15,25 +15,21 @@ public class ScheduleTaskHistory : BaseEntity, ICloneable /// /// Gets or sets whether the task is running. /// - [Index("IX_MachineName_IsRunning", 1)] public bool IsRunning { get; set; } /// /// Gets or sets the server machine name. /// - [Index("IX_MachineName_IsRunning", 0)] public string MachineName { get; set; } /// /// Gets or sets the date when the task was started. It is also the date when this entry was created. /// - [Index("IX_Started_Finished", 0)] public DateTime StartedOnUtc { get; set; } /// /// Gets or sets the date when the task has been finished. /// - [Index("IX_Started_Finished", 1)] public DateTime? FinishedOnUtc { get; set; } /// diff --git a/src/Libraries/SmartStore.Core/Events/CommonMessages/AppRegisterGlobalFiltersEvent.cs b/src/Libraries/SmartStore.Core/Events/CommonMessages/AppRegisterGlobalFiltersEvent.cs index 6fd6e8d6fe..1e35592ad6 100644 --- a/src/Libraries/SmartStore.Core/Events/CommonMessages/AppRegisterGlobalFiltersEvent.cs +++ b/src/Libraries/SmartStore.Core/Events/CommonMessages/AppRegisterGlobalFiltersEvent.cs @@ -1,4 +1,4 @@ -using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; namespace SmartStore.Core.Events { diff --git a/src/Libraries/SmartStore.Core/Events/CommonMessages/AppStartedEvent.cs b/src/Libraries/SmartStore.Core/Events/CommonMessages/AppStartedEvent.cs index 95576aea9f..d6f5004845 100644 --- a/src/Libraries/SmartStore.Core/Events/CommonMessages/AppStartedEvent.cs +++ b/src/Libraries/SmartStore.Core/Events/CommonMessages/AppStartedEvent.cs @@ -1,4 +1,4 @@ -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core.Events { diff --git a/src/Libraries/SmartStore.Core/Extensions/EnumerableExtensions.cs b/src/Libraries/SmartStore.Core/Extensions/EnumerableExtensions.cs index f867372efa..86dcd8ef84 100644 --- a/src/Libraries/SmartStore.Core/Extensions/EnumerableExtensions.cs +++ b/src/Libraries/SmartStore.Core/Extensions/EnumerableExtensions.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Runtime.CompilerServices; using System.Text; -using System.Web; +using Microsoft.AspNetCore.Http; using SmartStore.Collections; using SmartStore.Core; using SmartStore.Utilities.ObjectPools; diff --git a/src/Libraries/SmartStore.Core/Extensions/HttpExtensions.cs b/src/Libraries/SmartStore.Core/Extensions/HttpExtensions.cs index a2618ee834..005fbe47a7 100644 --- a/src/Libraries/SmartStore.Core/Extensions/HttpExtensions.cs +++ b/src/Libraries/SmartStore.Core/Extensions/HttpExtensions.cs @@ -5,9 +5,9 @@ using System.Linq; using System.Net; using System.Runtime.CompilerServices; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.Caching; -using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; using System.Web.Security; using SmartStore.Core; using SmartStore.Core.Fakes; diff --git a/src/Libraries/SmartStore.Core/Extensions/RouteExtensions.cs b/src/Libraries/SmartStore.Core/Extensions/RouteExtensions.cs index 94ad48d31e..a7b9d8fec5 100644 --- a/src/Libraries/SmartStore.Core/Extensions/RouteExtensions.cs +++ b/src/Libraries/SmartStore.Core/Extensions/RouteExtensions.cs @@ -1,5 +1,5 @@ -using System.Web.Mvc; -using System.Web.Routing; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Routing; // use base SmartStore Namespace to ensure the extension methods are always available namespace SmartStore diff --git a/src/Libraries/SmartStore.Core/Extensions/StringExtensions.cs b/src/Libraries/SmartStore.Core/Extensions/StringExtensions.cs index efea7d0778..bf4efe7eab 100644 --- a/src/Libraries/SmartStore.Core/Extensions/StringExtensions.cs +++ b/src/Libraries/SmartStore.Core/Extensions/StringExtensions.cs @@ -9,7 +9,7 @@ using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; -using System.Web; +using Microsoft.AspNetCore.Http; using SmartStore.Core.Html; using SmartStore.Utilities.ObjectPools; diff --git a/src/Libraries/SmartStore.Core/Fakes/Extensions.cs b/src/Libraries/SmartStore.Core/Fakes/Extensions.cs index a6b9d765e8..4e65ce0a35 100644 --- a/src/Libraries/SmartStore.Core/Fakes/Extensions.cs +++ b/src/Libraries/SmartStore.Core/Fakes/Extensions.cs @@ -1,5 +1,5 @@ using System; -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core.Fakes { diff --git a/src/Libraries/SmartStore.Core/Fakes/FakeController.cs b/src/Libraries/SmartStore.Core/Fakes/FakeController.cs index 2e2e4ee851..90f65998d5 100644 --- a/src/Libraries/SmartStore.Core/Fakes/FakeController.cs +++ b/src/Libraries/SmartStore.Core/Fakes/FakeController.cs @@ -1,4 +1,4 @@ -using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; namespace SmartStore.Core.Fakes { diff --git a/src/Libraries/SmartStore.Core/Fakes/FakeHttpContext.cs b/src/Libraries/SmartStore.Core/Fakes/FakeHttpContext.cs index 6da257d71a..159a262d2e 100644 --- a/src/Libraries/SmartStore.Core/Fakes/FakeHttpContext.cs +++ b/src/Libraries/SmartStore.Core/Fakes/FakeHttpContext.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Security.Principal; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.SessionState; namespace SmartStore.Core.Fakes diff --git a/src/Libraries/SmartStore.Core/Fakes/FakeHttpHandler.cs b/src/Libraries/SmartStore.Core/Fakes/FakeHttpHandler.cs index ea0839801a..1b42258b2f 100644 --- a/src/Libraries/SmartStore.Core/Fakes/FakeHttpHandler.cs +++ b/src/Libraries/SmartStore.Core/Fakes/FakeHttpHandler.cs @@ -1,5 +1,5 @@ using System; -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core.Fakes { diff --git a/src/Libraries/SmartStore.Core/Fakes/FakeHttpRequest.cs b/src/Libraries/SmartStore.Core/Fakes/FakeHttpRequest.cs index 5bc4db024a..bbcf819c0d 100644 --- a/src/Libraries/SmartStore.Core/Fakes/FakeHttpRequest.cs +++ b/src/Libraries/SmartStore.Core/Fakes/FakeHttpRequest.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Specialized; -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Routing; namespace SmartStore.Core.Fakes { diff --git a/src/Libraries/SmartStore.Core/Fakes/FakeHttpResponse.cs b/src/Libraries/SmartStore.Core/Fakes/FakeHttpResponse.cs index 4b5719ed6e..1552cc5443 100644 --- a/src/Libraries/SmartStore.Core/Fakes/FakeHttpResponse.cs +++ b/src/Libraries/SmartStore.Core/Fakes/FakeHttpResponse.cs @@ -1,5 +1,5 @@ using System.Text; -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core.Fakes { diff --git a/src/Libraries/SmartStore.Core/Fakes/FakeHttpSessionState.cs b/src/Libraries/SmartStore.Core/Fakes/FakeHttpSessionState.cs index 6d45307e06..7c991a4716 100644 --- a/src/Libraries/SmartStore.Core/Fakes/FakeHttpSessionState.cs +++ b/src/Libraries/SmartStore.Core/Fakes/FakeHttpSessionState.cs @@ -1,6 +1,6 @@ using System.Collections; using System.Collections.Specialized; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.SessionState; namespace SmartStore.Core.Fakes diff --git a/src/Libraries/SmartStore.Core/Html/CodeFormatter/CodeFormatHelper.cs b/src/Libraries/SmartStore.Core/Html/CodeFormatter/CodeFormatHelper.cs index ff56b0f0d5..50dcf63fa1 100644 --- a/src/Libraries/SmartStore.Core/Html/CodeFormatter/CodeFormatHelper.cs +++ b/src/Libraries/SmartStore.Core/Html/CodeFormatter/CodeFormatHelper.cs @@ -1,6 +1,6 @@ using System; using System.Text.RegularExpressions; -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core.Html.CodeFormatter { diff --git a/src/Libraries/SmartStore.Core/Html/HtmlUtils.cs b/src/Libraries/SmartStore.Core/Html/HtmlUtils.cs index 2428d3c4aa..6fa69dd611 100644 --- a/src/Libraries/SmartStore.Core/Html/HtmlUtils.cs +++ b/src/Libraries/SmartStore.Core/Html/HtmlUtils.cs @@ -3,12 +3,12 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; -using System.Web; +using Microsoft.AspNetCore.Http; using AngleSharp; using AngleSharp.Dom; using AngleSharp.Extensions; -using AngleSharp.Parser.Html; -using Ganss.XSS; +using AngleSharp.Html.Parser; +using Ganss.Xss; using SmartStore.Utilities.ObjectPools; namespace SmartStore.Core.Html diff --git a/src/Libraries/SmartStore.Core/IO/LocalFileSystem.cs b/src/Libraries/SmartStore.Core/IO/LocalFileSystem.cs index 45bb9e8c77..0588e2a8eb 100644 --- a/src/Libraries/SmartStore.Core/IO/LocalFileSystem.cs +++ b/src/Libraries/SmartStore.Core/IO/LocalFileSystem.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.Hosting; using SmartStore.Utilities; diff --git a/src/Libraries/SmartStore.Core/IO/VirtualPath/DefaultVirtualPathProvider.cs b/src/Libraries/SmartStore.Core/IO/VirtualPath/DefaultVirtualPathProvider.cs index a7eea24f4e..c0e4cfb011 100644 --- a/src/Libraries/SmartStore.Core/IO/VirtualPath/DefaultVirtualPathProvider.cs +++ b/src/Libraries/SmartStore.Core/IO/VirtualPath/DefaultVirtualPathProvider.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.Caching; using System.Web.Hosting; using SmartStore.Core.Logging; diff --git a/src/Libraries/SmartStore.Core/IO/VirtualPath/IVirtualPathProvider.cs b/src/Libraries/SmartStore.Core/IO/VirtualPath/IVirtualPathProvider.cs index 2a7d3717f0..7fde4fd496 100644 --- a/src/Libraries/SmartStore.Core/IO/VirtualPath/IVirtualPathProvider.cs +++ b/src/Libraries/SmartStore.Core/IO/VirtualPath/IVirtualPathProvider.cs @@ -1,7 +1,7 @@ -using System; +using System; using System.Collections.Generic; using System.IO; -using System.Web.Caching; +using Microsoft.Extensions.Primitives; namespace SmartStore.Core.IO { @@ -15,7 +15,8 @@ public interface IVirtualPathProvider bool DirectoryExists(string virtualPath); bool FileExists(string virtualPath); - CacheDependency GetCacheDependency(string virtualPath, IEnumerable dependencies, DateTime utcStart); + // TODO: CacheDependency → IChangeToken migration + IChangeToken GetChangeToken(string virtualPath, IEnumerable dependencies); string GetCacheKey(string virtualPath); string GetFileHash(string virtualPath, IEnumerable dependencies); @@ -32,9 +33,9 @@ public static string GetFileHash(this IVirtualPathProvider vpp, string virtualPa return vpp.GetFileHash(virtualPath, new[] { virtualPath }); } - public static CacheDependency GetCacheDependency(this IVirtualPathProvider vpp, string virtualPath, DateTime utcStart) + public static IChangeToken GetChangeToken(this IVirtualPathProvider vpp, string virtualPath) { - return vpp.GetCacheDependency(virtualPath, new[] { virtualPath }, utcStart); + return vpp.GetChangeToken(virtualPath, new[] { virtualPath }); } } } diff --git a/src/Libraries/SmartStore.Core/IWebHelper.cs b/src/Libraries/SmartStore.Core/IWebHelper.cs index 31cd154105..120d605ad3 100644 --- a/src/Libraries/SmartStore.Core/IWebHelper.cs +++ b/src/Libraries/SmartStore.Core/IWebHelper.cs @@ -1,4 +1,4 @@ -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core { diff --git a/src/Libraries/SmartStore.Core/Infrastructure/ApplicationStart.cs b/src/Libraries/SmartStore.Core/Infrastructure/ApplicationStart.cs index 14b51e277c..70340a2ffb 100644 --- a/src/Libraries/SmartStore.Core/Infrastructure/ApplicationStart.cs +++ b/src/Libraries/SmartStore.Core/Infrastructure/ApplicationStart.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.Mvc; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using System.Web.Mvc.Filters; using SmartStore.Core.Logging; diff --git a/src/Libraries/SmartStore.Core/Infrastructure/ContextState.cs b/src/Libraries/SmartStore.Core/Infrastructure/ContextState.cs index ae9af5f59e..cf04b799d0 100644 --- a/src/Libraries/SmartStore.Core/Infrastructure/ContextState.cs +++ b/src/Libraries/SmartStore.Core/Infrastructure/ContextState.cs @@ -1,6 +1,6 @@ using System; using System.Runtime.Remoting.Messaging; -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core.Infrastructure { diff --git a/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/AutofacRequestLifetimeHttpModule.cs b/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/AutofacRequestLifetimeHttpModule.cs index d32030bcbd..5a36e3c757 100644 --- a/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/AutofacRequestLifetimeHttpModule.cs +++ b/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/AutofacRequestLifetimeHttpModule.cs @@ -1,59 +1,24 @@ -using System; -using System.Web; -using Autofac.Integration.Mvc; +using System; +// TODO: Migrate to ASP.NET Core middleware +// IHttpModule is not supported in ASP.NET Core +// Request scoping is handled automatically by ASP.NET Core DI namespace SmartStore.Core.Infrastructure.DependencyManagement { /// - /// An and implementation - /// that creates a nested lifetime scope for each HTTP request. + /// TODO: Convert to ASP.NET Core middleware + /// Original implementation used IHttpModule which is not supported in ASP.NET Core /// - public class AutofacRequestLifetimeHttpModule : IHttpModule + public class AutofacRequestLifetimeHttpModule { - public void Init(HttpApplication context) + public AutofacRequestLifetimeHttpModule() { - Guard.NotNull(context, nameof(context)); - - context.EndRequest += OnEndRequest; + // Stub - request scoping handled by ASP.NET Core DI } public static void OnEndRequest(object sender, EventArgs e) { - if (LifetimeScopeProvider != null) - { - LifetimeScopeProvider.EndLifetimeScope(); - } - - // Dispose all other disposable object in HttpContext.Items - PurgeContextItems(sender as HttpApplication); - } - - private static void PurgeContextItems(HttpApplication app) - { - var items = app?.Context?.Items; - - if (items != null) - { - int size = items.Count; - if (size > 0) - { - var keys = new object[size]; - items.Keys.CopyTo(keys, 0); - - for (int i = 0; i < size; i++) - { - var obj = items[keys[i]] as IDisposable; - if (obj != null) - { - try - { - obj.Dispose(); - } - catch { } - } - } - } - } + // TODO: Migrate to middleware if needed } public static void SetLifetimeScopeProvider(ILifetimeScopeProvider lifetimeScopeProvider) @@ -61,16 +26,6 @@ public static void SetLifetimeScopeProvider(ILifetimeScopeProvider lifetimeScope LifetimeScopeProvider = lifetimeScopeProvider ?? throw new ArgumentNullException("lifetimeScopeProvider"); } - - internal static ILifetimeScopeProvider LifetimeScopeProvider - { - get; - private set; - } - - public void Dispose() - { - } - + internal static ILifetimeScopeProvider LifetimeScopeProvider { get; private set; } } } diff --git a/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeAccessor.cs b/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeAccessor.cs index b4b0886ac5..4b41adf58c 100644 --- a/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeAccessor.cs +++ b/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeAccessor.cs @@ -1,5 +1,5 @@ using System; -using System.Web; +using Microsoft.AspNetCore.Http; using Autofac; using SmartStore.Utilities; diff --git a/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeProvider.cs b/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeProvider.cs index eab1548dc0..8ec6763a30 100644 --- a/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeProvider.cs +++ b/src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/DefaultLifetimeScopeProvider.cs @@ -1,9 +1,25 @@ -using System; +using System; using Autofac; -using Autofac.Integration.Mvc; +using Microsoft.Extensions.DependencyInjection; namespace SmartStore.Core.Infrastructure.DependencyManagement { + // TODO: ILifetimeScopeProvider removed in Autofac 8.x + // Use IServiceScopeFactory instead + public interface ILifetimeScopeProvider + { + ILifetimeScope ApplicationContainer { get; } + void EndLifetimeScope(); + ILifetimeScope GetLifetimeScope(Action configurationAction); + } + + public interface ILifetimeScopeAccessor + { + ILifetimeScope ApplicationContainer { get; } + void EndLifetimeScope(); + ILifetimeScope GetLifetimeScope(Action configurationAction); + } + public class DefaultLifetimeScopeProvider : ILifetimeScopeProvider { private readonly ILifetimeScopeAccessor _accessor; @@ -27,6 +43,5 @@ public ILifetimeScope GetLifetimeScope(Action configurationAct { return _accessor.GetLifetimeScope(configurationAction); } - } } diff --git a/src/Libraries/SmartStore.Core/Infrastructure/SmartStoreEngine.cs b/src/Libraries/SmartStore.Core/Infrastructure/SmartStoreEngine.cs index 5fabdf7d55..12ef48e82a 100644 --- a/src/Libraries/SmartStore.Core/Infrastructure/SmartStoreEngine.cs +++ b/src/Libraries/SmartStore.Core/Infrastructure/SmartStoreEngine.cs @@ -3,9 +3,9 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; -using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; using Autofac; -using Autofac.Integration.Mvc; +using Autofac.Extensions.DependencyInjection; using SmartStore.Core.Data; using SmartStore.Core.Infrastructure.DependencyManagement; using SmartStore.Core.Logging; diff --git a/src/Libraries/SmartStore.Core/Infrastructure/WebAppTypeFinder.cs b/src/Libraries/SmartStore.Core/Infrastructure/WebAppTypeFinder.cs index 4b6981b2ef..5fed7b0173 100644 --- a/src/Libraries/SmartStore.Core/Infrastructure/WebAppTypeFinder.cs +++ b/src/Libraries/SmartStore.Core/Infrastructure/WebAppTypeFinder.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.Hosting; using SmartStore.Core.Logging; using SmartStore.Core.Plugins; diff --git a/src/Libraries/SmartStore.Core/Localization/LocalizationFileResolver.cs b/src/Libraries/SmartStore.Core/Localization/LocalizationFileResolver.cs index 7a97e459b3..5cd8631c15 100644 --- a/src/Libraries/SmartStore.Core/Localization/LocalizationFileResolver.cs +++ b/src/Libraries/SmartStore.Core/Localization/LocalizationFileResolver.cs @@ -2,7 +2,7 @@ using System.Globalization; using System.IO; using System.Text.RegularExpressions; -using System.Web; +using Microsoft.AspNetCore.Http; using SmartStore.Core.Caching; using SmartStore.Utilities; diff --git a/src/Libraries/SmartStore.Core/Localization/LocalizedString.cs b/src/Libraries/SmartStore.Core/Localization/LocalizedString.cs index 82dc95d9ee..5c3608b84f 100644 --- a/src/Libraries/SmartStore.Core/Localization/LocalizedString.cs +++ b/src/Libraries/SmartStore.Core/Localization/LocalizedString.cs @@ -1,5 +1,5 @@ using System; -using System.Web; +using Microsoft.AspNetCore.Http; namespace SmartStore.Core.Localization { diff --git a/src/Libraries/SmartStore.Core/Logging/log4net/Log4netLogger.cs b/src/Libraries/SmartStore.Core/Logging/log4net/Log4netLogger.cs index be5b37a6b1..764e4d013b 100644 --- a/src/Libraries/SmartStore.Core/Logging/log4net/Log4netLogger.cs +++ b/src/Libraries/SmartStore.Core/Logging/log4net/Log4netLogger.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Web; +using Microsoft.AspNetCore.Http; using log4net.Core; using log4net.Util; using SmartStore.Core.Data; diff --git a/src/Libraries/SmartStore.Core/Packaging/NuGet/ExtensionReferenceRepository.cs b/src/Libraries/SmartStore.Core/Packaging/NuGet/ExtensionReferenceRepository.cs index 644b6b15a7..98463920c7 100644 --- a/src/Libraries/SmartStore.Core/Packaging/NuGet/ExtensionReferenceRepository.cs +++ b/src/Libraries/SmartStore.Core/Packaging/NuGet/ExtensionReferenceRepository.cs @@ -1,72 +1,53 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; -using NuGet; +// TODO: Migrate to NuGet.Protocol v3 API +// This class used NuGet.Core v2 API which is obsolete +// See: https://docs.microsoft.com/en-us/nuget/reference/nuget-client-sdk using SmartStore.Core.Plugins; using SmartStore.Core.Themes; namespace SmartStore.Core.Packaging { - + // TODO: Migrate to NuGet.Protocol v3 API + // Original implementation commented out - uses obsolete NuGet.Core + /* internal abstract class ExtensionReferenceRepository : PackageRepositoryBase { - public ExtensionReferenceRepository(IProjectSystem project, IPackageRepository sourceRepository) { Guard.NotNull(project, nameof(project)); Guard.NotNull(sourceRepository, nameof(sourceRepository)); - Project = project; SourceRepository = sourceRepository; } - - public IProjectSystem Project - { - get; - set; - } - - public IPackageRepository SourceRepository - { - get; - set; - } - + public IProjectSystem Project { get; set; } + public IPackageRepository SourceRepository { get; set; } public override void AddPackage(IPackage package) { } - public override void RemovePackage(IPackage package) { } - - public override string Source => Project.Root; - public override bool SupportsPrereleasePackages => true; } + */ + + // Temporary stub to allow compilation + internal abstract class ExtensionReferenceRepository + { + protected ExtensionReferenceRepository() + { + throw new NotImplementedException("TODO: Migrate to NuGet.Protocol v3 API"); + } + } /// /// This repository implementation informs about what plugin packages are already installed. /// internal class PluginReferenceRepository : ExtensionReferenceRepository { - private readonly IList _descriptors; - - public PluginReferenceRepository(IProjectSystem project, IPackageRepository sourceRepository, IPluginFinder pluginFinder) - : base(project, sourceRepository) + public PluginReferenceRepository(IPluginFinder pluginFinder) { - _descriptors = pluginFinder.GetPluginDescriptors().ToList(); - } - - public override IQueryable GetPackages() - { - IEnumerable repositoryPackages = SourceRepository.GetPackages().ToList(); - IEnumerable packages = from plugin in _descriptors - let id = PackagingUtils.BuildPackageId(plugin.SystemName, "Plugin") - let version = plugin.Version != null ? new SemanticVersion(plugin.Version) : null - let package = repositoryPackages.FirstOrDefault(p => p.Id == id && (version == null || p.Version == version)) - where package != null - select package; - - return packages.AsQueryable(); + throw new NotImplementedException("TODO: Migrate to NuGet.Protocol v3 API"); } - } /// @@ -74,27 +55,9 @@ public override IQueryable GetPackages() /// internal class ThemeReferenceRepository : ExtensionReferenceRepository { - private readonly ICollection _themeManifests; - - public ThemeReferenceRepository(IProjectSystem project, IPackageRepository sourceRepository, IThemeRegistry themeRegistry) - : base(project, sourceRepository) - { - _themeManifests = themeRegistry.GetThemeManifests(true); - } - - public override IQueryable GetPackages() + public ThemeReferenceRepository(IThemeRegistry themeRegistry) { - IEnumerable repositoryPackages = SourceRepository.GetPackages().ToList(); - IEnumerable packages = from theme in _themeManifests - let id = PackagingUtils.BuildPackageId(theme.ThemeName, "Theme") - let version = theme.Version != null ? new SemanticVersion(theme.Version) : null - let package = repositoryPackages.FirstOrDefault(p => p.Id == id && (version == null || p.Version == version)) - where package != null - select package; - - return packages.AsQueryable(); + throw new NotImplementedException("TODO: Migrate to NuGet.Protocol v3 API"); } - } - } diff --git a/src/Libraries/SmartStore.Core/Packaging/NuGet/FileBasedProjectSystem.cs b/src/Libraries/SmartStore.Core/Packaging/NuGet/FileBasedProjectSystem.cs index 22e5a3c580..94ba28961e 100644 --- a/src/Libraries/SmartStore.Core/Packaging/NuGet/FileBasedProjectSystem.cs +++ b/src/Libraries/SmartStore.Core/Packaging/NuGet/FileBasedProjectSystem.cs @@ -1,85 +1,16 @@ -using System; -using System.IO; -using System.Runtime.Versioning; -using NuGet; +using System; +// TODO: Migrate to NuGet.Protocol v3 API +// This class used NuGet.Core v2 API which is obsolete namespace SmartStore.Core.Packaging { - internal class FileBasedProjectSystem : PhysicalFileSystem, IProjectSystem + // TODO: Migrate to NuGet.Protocol v3 API - use direct file system operations + // Original implementation commented out + internal class FileBasedProjectSystem { - public FileBasedProjectSystem(string root) - : base(root) - { - } - - public void AddFrameworkReference(string name) - { - throw new NotSupportedException(); - } - - public void AddImport(string targetPath, ProjectImportLocation location) - { - throw new NotSupportedException(); - } - - public void AddReference(string referencePath, Stream stream) { - throw new NotSupportedException(); - } - - public bool FileExistsInProject(string path) - { - return FileExists(path); - } - - public bool IsBindingRedirectSupported => false; - - public bool IsSupportedFile(string path) - { - return true; - } - - public string ProjectName => Root; - - protected virtual string GetReferencePath(string name) - { - return Path.Combine("bin", name); - } - - public bool ReferenceExists(string name) - { - string path = GetReferencePath(name); - return FileExists(path); - } - - public void RemoveImport(string targetPath) - { - throw new NotSupportedException(); - } - - public void RemoveReference(string name) - { - throw new NotSupportedException(); - } - - public string ResolvePath(string path) - { - return GetFullPath(path); - } - - public FrameworkName TargetFramework => VersionUtility.DefaultTargetFramework; - - public dynamic GetPropertyValue(string propertyName) - { - if (propertyName == null) - { - return null; - } - - // Return empty string for the root namespace of this project. - return propertyName.Equals("RootNamespace", StringComparison.OrdinalIgnoreCase) ? String.Empty : null; + throw new NotImplementedException("TODO: Migrate to direct file system operations"); } } - } diff --git a/src/Libraries/SmartStore.Core/Packaging/NuGet/NugetLogger.cs b/src/Libraries/SmartStore.Core/Packaging/NuGet/NugetLogger.cs index 8a2942f601..b3d3486956 100644 --- a/src/Libraries/SmartStore.Core/Packaging/NuGet/NugetLogger.cs +++ b/src/Libraries/SmartStore.Core/Packaging/NuGet/NugetLogger.cs @@ -1,41 +1,15 @@ -using System; -using NuGet; -using SmartStore.Core.Logging; -using Log = SmartStore.Core.Logging; +using System; +// TODO: Migrate to NuGet.Protocol v3 API +// This class used NuGet.Core v2 API which is obsolete namespace SmartStore.Core.Packaging { - internal class NugetLogger : NuGet.ILogger + // TODO: Migrate to NuGet.Protocol v3 API - use NuGet.Common.ILogger + internal class NugetLogger { - private readonly Log.ILogger _logger; - - public NugetLogger(Log.ILogger logger) - { - _logger = logger; - } - - public void Log(MessageLevel level, string message, params object[] args) - { - switch (level) - { - case MessageLevel.Debug: - _logger.Debug(String.Format(message, args)); - break; - case MessageLevel.Error: - _logger.Error(String.Format(message, args)); - break; - case MessageLevel.Info: - _logger.Info(String.Format(message, args)); - break; - case MessageLevel.Warning: - _logger.Warn(String.Format(message, args)); - break; - } - } - - public FileConflictResolution ResolveFileConflict(string message) + public NugetLogger() { - return FileConflictResolution.OverwriteAll; + throw new NotImplementedException("TODO: Migrate to NuGet.Common.ILogger"); } } } diff --git a/src/Libraries/SmartStore.Core/Packaging/NuGet/NullSourceRepository.cs b/src/Libraries/SmartStore.Core/Packaging/NuGet/NullSourceRepository.cs index 24d9271ae6..e3aae2f5f7 100644 --- a/src/Libraries/SmartStore.Core/Packaging/NuGet/NullSourceRepository.cs +++ b/src/Libraries/SmartStore.Core/Packaging/NuGet/NullSourceRepository.cs @@ -1,24 +1,15 @@ -using System.Linq; -using NuGet; +using System; +// TODO: Migrate to NuGet.Protocol v3 API +// This class used NuGet.Core v2 API which is obsolete namespace SmartStore.Core.Packaging { - /// - /// This repository implementation fakes a source (remote) repository - /// - internal class NullSourceRepository : PackageRepositoryBase + // TODO: Migrate to NuGet.Protocol v3 API - use SourceRepository + internal class NullSourceRepository { - public override IQueryable GetPackages() + public NullSourceRepository() { - return Enumerable.Empty().AsQueryable(); + throw new NotImplementedException("TODO: Migrate to NuGet.Protocol v3 API"); } - - public override string Source => string.Empty; - - public override bool SupportsPrereleasePackages => true; - - public override void AddPackage(IPackage package) { } - - public override void RemovePackage(IPackage package) { } } } diff --git a/src/Libraries/SmartStore.Core/PagedList`T.cs b/src/Libraries/SmartStore.Core/PagedList`T.cs index 3796a1350a..52d95d3440 100644 --- a/src/Libraries/SmartStore.Core/PagedList`T.cs +++ b/src/Libraries/SmartStore.Core/PagedList`T.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Data.Entity; +using Microsoft.EntityFrameworkCore; using System.Data.Entity.Infrastructure; using System.Linq; using System.Threading.Tasks; diff --git a/src/Libraries/SmartStore.Core/Plugins/IConfigurable.cs b/src/Libraries/SmartStore.Core/Plugins/IConfigurable.cs index aaee54810c..4c6ee27dbb 100644 --- a/src/Libraries/SmartStore.Core/Plugins/IConfigurable.cs +++ b/src/Libraries/SmartStore.Core/Plugins/IConfigurable.cs @@ -1,4 +1,4 @@ -using System.Web.Routing; +using Microsoft.AspNetCore.Routing; namespace SmartStore.Core.Plugins { diff --git a/src/Libraries/SmartStore.Core/Plugins/PluginManager.cs b/src/Libraries/SmartStore.Core/Plugins/PluginManager.cs index d8a3f158af..b6475ba9ac 100644 --- a/src/Libraries/SmartStore.Core/Plugins/PluginManager.cs +++ b/src/Libraries/SmartStore.Core/Plugins/PluginManager.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.Compilation; using Microsoft.Web.Infrastructure.DynamicModuleHelper; using SmartStore.Core.Data; @@ -21,7 +21,8 @@ // SEE THIS POST for full details of what this does //http://shazwazza.com/post/Developing-a-plugin-framework-in-ASPNET-with-medium-trust.aspx -[assembly: PreApplicationStartMethod(typeof(PluginManager), "Initialize")] +// TODO: PreApplicationStartMethod removed - call Initialize() from Program.cs +// [assembly: PreApplicationStartMethod(typeof(PluginManager), "Initialize")] namespace SmartStore.Core.Plugins { /// diff --git a/src/Libraries/SmartStore.Core/RouteInfo.cs b/src/Libraries/SmartStore.Core/RouteInfo.cs index e98f9d9004..5932759ce3 100644 --- a/src/Libraries/SmartStore.Core/RouteInfo.cs +++ b/src/Libraries/SmartStore.Core/RouteInfo.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using System.Web.Routing; +using Microsoft.AspNetCore.Routing; using Newtonsoft.Json; namespace SmartStore diff --git a/src/Libraries/SmartStore.Core/Rules/Domain/RuleEntity.cs b/src/Libraries/SmartStore.Core/Rules/Domain/RuleEntity.cs index 587be18e1f..5dc1193482 100644 --- a/src/Libraries/SmartStore.Core/Rules/Domain/RuleEntity.cs +++ b/src/Libraries/SmartStore.Core/Rules/Domain/RuleEntity.cs @@ -17,7 +17,6 @@ public partial class RuleEntity : BaseEntity [DataMember] [Required, StringLength(100)] - [Index("IX_PageBuilder_RuleType")] public string RuleType { get; set; } //[DataMember] @@ -33,7 +32,6 @@ public partial class RuleEntity : BaseEntity public string Value { get; set; } [DataMember] - [Index("IX_PageBuilder_DisplayOrder")] public int DisplayOrder { get; set; } [NotMapped] diff --git a/src/Libraries/SmartStore.Core/Rules/Domain/RuleSetEntity.cs b/src/Libraries/SmartStore.Core/Rules/Domain/RuleSetEntity.cs index 96d4bb591e..12835f0fcd 100644 --- a/src/Libraries/SmartStore.Core/Rules/Domain/RuleSetEntity.cs +++ b/src/Libraries/SmartStore.Core/Rules/Domain/RuleSetEntity.cs @@ -29,18 +29,15 @@ public partial class RuleSetEntity : BaseEntity, IAuditable [StringLength(400)] public string Description { get; set; } - [Index("IX_RuleSetEntity_Scope", Order = 0)] public bool IsActive { get; set; } = true; [Required] - [Index("IX_RuleSetEntity_Scope", Order = 1)] public RuleScope Scope { get; set; } /// /// True when this set is an internal composite container for rules within another ruleset. /// - [Index] public bool IsSubGroup { get; set; } public LogicalRuleOperator LogicalOperator { get; set; } diff --git a/src/Libraries/SmartStore.Core/Rules/RuleStorage.cs b/src/Libraries/SmartStore.Core/Rules/RuleStorage.cs index 8b8226c2bd..57e338c77f 100644 --- a/src/Libraries/SmartStore.Core/Rules/RuleStorage.cs +++ b/src/Libraries/SmartStore.Core/Rules/RuleStorage.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using System.Data.Entity; +using Microsoft.EntityFrameworkCore; using System.Linq; using SmartStore.Core; using SmartStore.Core.Caching; diff --git a/src/Libraries/SmartStore.Core/Security/PermissionAttribute.cs b/src/Libraries/SmartStore.Core/Security/PermissionAttribute.cs index b1e4b0399c..90c62dd11c 100644 --- a/src/Libraries/SmartStore.Core/Security/PermissionAttribute.cs +++ b/src/Libraries/SmartStore.Core/Security/PermissionAttribute.cs @@ -2,7 +2,8 @@ using System.Linq; using System.Net; using System.Text; -using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; namespace SmartStore.Core.Security { @@ -10,7 +11,7 @@ namespace SmartStore.Core.Security /// Checks request permission for the current customer. /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = true, AllowMultiple = true)] - public partial class PermissionAttribute : FilterAttribute, IAuthorizationFilter + public partial class PermissionAttribute : Attribute, IAuthorizationFilter { /// /// e.g. [Permission(PermissionSystemNames.Customer.Read)] @@ -40,9 +41,9 @@ public PermissionAttribute( public IWorkContext WorkContext { get; set; } public IPermissionService PermissionService { get; set; } - public virtual void OnAuthorization(AuthorizationContext filterContext) + public virtual void OnAuthorization(AuthorizationFilterContext context) { - Guard.NotNull(filterContext, nameof(filterContext)); + Guard.NotNull(context, nameof(context)); if (PermissionService.Authorize(SystemName, WorkContext.CurrentCustomer)) { @@ -51,17 +52,17 @@ public virtual void OnAuthorization(AuthorizationContext filterContext) try { - HandleUnauthorizedRequest(filterContext); + HandleUnauthorizedRequest(context); } catch { - filterContext.Result = new HttpStatusCodeResult(HttpStatusCode.Unauthorized); + context.Result = new HttpStatusCodeResult(HttpStatusCode.Unauthorized); } } - protected virtual void HandleUnauthorizedRequest(AuthorizationContext filterContext) + protected virtual void HandleUnauthorizedRequest(AuthorizationFilterContext context) { - var httpContext = filterContext.HttpContext; + var httpContext = context.HttpContext; var request = httpContext?.Request; if (request == null) @@ -83,19 +84,19 @@ protected virtual void HandleUnauthorizedRequest(AuthorizationContext filterCont if (request.AcceptTypes?.Any(x => x.IsCaseInsensitiveEqual("text/html")) ?? false) { - filterContext.Result = AccessDeniedResult(message); + context.Result = AccessDeniedResult(message); } else { - filterContext.Result = new JsonResult + context.Result = new JsonResult { JsonRequestBehavior = JsonRequestBehavior.AllowGet, Data = new { error = true, success = false, - controller = filterContext.ActionDescriptor.ControllerDescriptor.ControllerName, - action = filterContext.ActionDescriptor.ActionName, + controller = context.ActionDescriptor.ControllerDescriptor.ControllerName, + action = context.ActionDescriptor.ActionName, //message } }; @@ -103,17 +104,17 @@ protected virtual void HandleUnauthorizedRequest(AuthorizationContext filterCont } else { - if (filterContext.IsChildAction) + if (context.IsChildAction) { - filterContext.Result = AccessDeniedResult(message); + context.Result = AccessDeniedResult(message); } else { var urlHelper = new UrlHelper(request.RequestContext); var url = urlHelper.Action("AccessDenied", "Security", new { pageUrl = request.RawUrl, area = "Admin" }); - filterContext.Controller.TempData["UnauthorizedMessage"] = message; - filterContext.Result = new RedirectResult(url); + context.Controller.TempData["UnauthorizedMessage"] = message; + context.Result = new RedirectResult(url); } } } diff --git a/src/Libraries/SmartStore.Core/SmartStore.Core.csproj b/src/Libraries/SmartStore.Core/SmartStore.Core.csproj index cd84ae4268..32a0979ffe 100644 --- a/src/Libraries/SmartStore.Core/SmartStore.Core.csproj +++ b/src/Libraries/SmartStore.Core/SmartStore.Core.csproj @@ -1,810 +1,38 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {6BDA8332-939F-45B7-A25E-7A797260AE59} - Library - Properties - SmartStore.Core + net8.0 SmartStore.Core - v4.7.2 - 512 - - - - - - - - - - ..\..\ - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - true - bin\EFMigrations\ - DEBUG;TRACE - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - true - bin\PluginDev\ - DEBUG;TRACE - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset + SmartStore.Core + false + latest + disable + - - ..\..\packages\AngleSharp.0.9.11\lib\net45\AngleSharp.dll - - - ..\..\packages\Autofac.5.2.0\lib\net461\Autofac.dll - - - ..\..\packages\Autofac.Mvc5.5.0.0\lib\net461\Autofac.Integration.Mvc.dll - - - ..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll - True - - - ..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll - True - - - ..\..\packages\HtmlSanitizer.4.0.205\lib\net45\HtmlSanitizer.dll - - - ..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll - True - - - ..\..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - True - ..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\..\packages\Microsoft.Web.Xdt.3.0.0\lib\net40\Microsoft.Web.XmlTransform.dll - - - ..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\..\packages\NuGet.Core.2.14.0\lib\net40-Client\NuGet.Core.dll - True - - - - - - - - ..\..\packages\Microsoft.SqlServer.Compact.4.0.8876.1\lib\net40\System.Data.SqlServerCe.dll - True - - - - ..\..\packages\System.Linq.Dynamic.Core.1.2.1\lib\net46\System.Linq.Dynamic.Core.dll - - - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - - - ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - - Properties\AssemblySharedInfo.cs - - - Properties\AssemblyVersionInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - + + + + + + - - - - - - - - - \ No newline at end of file + diff --git a/src/Libraries/SmartStore.Core/SmartStore.Core.csproj.old-style b/src/Libraries/SmartStore.Core/SmartStore.Core.csproj.old-style new file mode 100644 index 0000000000..f58b92a1da --- /dev/null +++ b/src/Libraries/SmartStore.Core/SmartStore.Core.csproj.old-style @@ -0,0 +1,808 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {6BDA8332-939F-45B7-A25E-7A797260AE59} + Library + Properties + SmartStore.Core + SmartStore.Core + net8.0 + 512 + + + + + + + + + ..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + bin\EFMigrations\ + DEBUG;TRACE + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + true + bin\PluginDev\ + DEBUG;TRACE + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + + ..\..\packages\AngleSharp.0.9.11\lib\net45\AngleSharp.dll + + + ..\..\packages\Autofac.5.2.0\lib\net461\Autofac.dll + + + ..\..\packages\Autofac.Mvc5.5.0.0\lib\net461\Autofac.Integration.Mvc.dll + + + ..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll + True + + + ..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll + True + + + ..\..\packages\HtmlSanitizer.4.0.205\lib\net45\HtmlSanitizer.dll + + + ..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll + True + + + ..\..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + + True + ..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + ..\..\packages\Microsoft.Web.Xdt.3.0.0\lib\net40\Microsoft.Web.XmlTransform.dll + + + ..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + + ..\..\packages\NuGet.Core.2.14.0\lib\net40-Client\NuGet.Core.dll + True + + + + + + + + ..\..\packages\Microsoft.SqlServer.Compact.4.0.8876.1\lib\net40\System.Data.SqlServerCe.dll + True + + + + ..\..\packages\System.Linq.Dynamic.Core.1.2.1\lib\net46\System.Linq.Dynamic.Core.dll + + + + + ..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + + ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + + ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll + + + ..\..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll + + + ..\..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll + + + ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll + + + ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll + + + ..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll + + + + + + + + + + Properties\AssemblySharedInfo.cs + + + Properties\AssemblyVersionInfo.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/SmartStore.Core/Utilities/CommonHelper.cs b/src/Libraries/SmartStore.Core/Utilities/CommonHelper.cs index 0b1cd338e5..ce884fab2e 100644 --- a/src/Libraries/SmartStore.Core/Utilities/CommonHelper.cs +++ b/src/Libraries/SmartStore.Core/Utilities/CommonHelper.cs @@ -11,7 +11,7 @@ using System.Security.Cryptography; using System.Text; using System.Web.Hosting; -using System.Web.Mvc; +using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using SmartStore.ComponentModel; diff --git a/src/Libraries/SmartStore.Core/Utilities/FileDownloadManager.cs b/src/Libraries/SmartStore.Core/Utilities/FileDownloadManager.cs index b54d69e003..8f6302c697 100644 --- a/src/Libraries/SmartStore.Core/Utilities/FileDownloadManager.cs +++ b/src/Libraries/SmartStore.Core/Utilities/FileDownloadManager.cs @@ -8,7 +8,7 @@ using System.Net.Mime; using System.Threading; using System.Threading.Tasks; -using System.Web; +using Microsoft.AspNetCore.Http; using SmartStore.Core; using SmartStore.Core.IO; using SmartStore.Core.Logging; diff --git a/src/Libraries/SmartStore.Core/WebHelper.cs b/src/Libraries/SmartStore.Core/WebHelper.cs index 14a332af68..4afbdbfe08 100644 --- a/src/Libraries/SmartStore.Core/WebHelper.cs +++ b/src/Libraries/SmartStore.Core/WebHelper.cs @@ -10,7 +10,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading; -using System.Web; +using Microsoft.AspNetCore.Http; using System.Web.Configuration; using SmartStore.Collections; using SmartStore.Core.Data; diff --git a/src/Libraries/SmartStore.Data/SmartStore.Data.csproj b/src/Libraries/SmartStore.Data/SmartStore.Data.csproj index fb594ed6a4..81c4ec164f 100644 --- a/src/Libraries/SmartStore.Data/SmartStore.Data.csproj +++ b/src/Libraries/SmartStore.Data/SmartStore.Data.csproj @@ -10,7 +10,7 @@ Properties SmartStore.Data SmartStore.Data - v4.7.2 + net8.0 512 @@ -20,7 +20,8 @@ - + + ..\..\ true @@ -1005,7 +1006,6 @@ -