Skip to content

Commit 019ed02

Browse files
committed
Merge branch '2.x' into 3.x
2 parents 3399058 + 57ec5ab commit 019ed02

18 files changed

Lines changed: 282 additions & 35 deletions

File tree

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ The state-of-the-art architecture of SmartStore.NET - with `ASP.NET 4.5` + `MVC
5454
* and many more...
5555

5656
## Project Status
57-
SmartStore.NET V2.1 has been released on November 24. 2014. The highlights are:
58-
59-
* Drastically **simplified plugin development, debugging & deployment**
60-
* **Theme inheritance**: create derived child themes with minimum effort by overriding only small parts (static files and even variables)
61-
* New backend design and cleaner frontend theme
62-
* More comfortable catalog management & product editing
63-
* New payment plugins `Pay with Amazon` & `Accarda-Kar`
64-
* **Preview Mode**: virtually test themes and shops more easily
65-
* **Simplified checkout** process
66-
* **New Image Gallery** component in public product details page
67-
* Support for **hierarchical SEO slugs**, e.g.: samsung/galaxy/s5/16gb/white
68-
* Support for new EU VAT regulation for digital goods (2008/8/EG directive)
57+
SmartStore.NET V2.2.1 has been released on May 15, 2015. The highlights are:
58+
59+
* Overall performance increase
60+
* Added multistore support for forums
61+
* New option to display product thumbnails in instant search
62+
* New mobile theme: _MobileLight_ (a light variant of the default mobile theme)
63+
* Quantity unit management
64+
* Limit country settings to stores
65+
* Web API: Support for file upload and multipart mime
66+
* More reliable mobile device detection
67+
* Performance: product list rendering up to 10x (!) faster now
68+
* Lots of bug fixes
6969

7070

7171
##Try it online

src/Libraries/SmartStore.Core/Data/IRepository.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,27 @@ public partial interface IRepository<T> where T : BaseEntity
6060
/// <remarks>Implementors should delegate this to the current <see cref="IDbContext" /></remarks>
6161
void Update(T entity);
6262

63+
/// <summary>
64+
/// Marks the changes of existing entities to be saved to the store.
65+
/// </summary>
66+
/// <param name="entity">A list of entity instances that should be updated in the database.</param>
67+
/// <remarks>Implementors should delegate this to the current <see cref="IDbContext" /></remarks>
68+
void UpdateRange(IEnumerable<T> entities);
69+
6370
/// <summary>
6471
/// Marks an existing entity to be deleted from the store.
6572
/// </summary>
6673
/// <param name="entity">An entity instance that should be deleted from the database.</param>
6774
/// <remarks>Implementors should delegate this to the current <see cref="IDbContext" /></remarks>
6875
void Delete(T entity);
6976

77+
/// <summary>
78+
/// Marks existing entities to be deleted from the store.
79+
/// </summary>
80+
/// <param name="entities">A list of entity instances that should be deleted from the database.</param>
81+
/// <remarks>Implementors should delegate this to the current <see cref="IDbContext" /></remarks>
82+
void DeleteRange(IEnumerable<T> entities);
83+
7084
[Obsolete("Use the extension method from 'SmartStore.Core, SmartStore.Core.Data' instead")]
7185
IQueryable<T> Expand(IQueryable<T> query, string path);
7286

src/Libraries/SmartStore.Core/Domain/Catalog/Category.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations.Schema;
34
using System.Diagnostics;
45
using System.Runtime.Serialization;
56
using SmartStore.Core.Domain.Discounts;
@@ -154,6 +155,7 @@ public partial class Category : BaseEntity, ISoftDeletable, ILocalizedEntity, IS
154155
/// <summary>
155156
/// Gets or sets a value indicating whether the entity has been deleted
156157
/// </summary>
158+
[Index]
157159
public bool Deleted { get; set; }
158160

159161
/// <summary>

src/Libraries/SmartStore.Core/Domain/Catalog/Manufacturer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using SmartStore.Core.Domain.Stores;
55
using System.Runtime.Serialization;
66
using SmartStore.Core.Domain.Media;
7+
using System.ComponentModel.DataAnnotations.Schema;
78

89
namespace SmartStore.Core.Domain.Catalog
910
{
@@ -100,6 +101,7 @@ public partial class Manufacturer : BaseEntity, ISoftDeletable, ILocalizedEntity
100101
/// <summary>
101102
/// Gets or sets a value indicating whether the entity has been deleted
102103
/// </summary>
104+
[Index]
103105
public bool Deleted { get; set; }
104106

105107
/// <summary>

src/Libraries/SmartStore.Core/Domain/Catalog/Product.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations.Schema;
34
using System.Diagnostics;
45
using System.Runtime.Serialization;
56
using SmartStore.Core.Domain.Directory;
@@ -664,6 +665,7 @@ public decimal Height
664665
/// <summary>
665666
/// Gets or sets a value indicating whether the entity has been deleted
666667
/// </summary>
668+
[Index]
667669
public bool Deleted { get; set; }
668670

669671
/// <summary>

src/Libraries/SmartStore.Core/Domain/Customers/Customer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations.Schema;
34
using System.Linq;
45
using System.Runtime.Serialization;
56
using SmartStore.Core.Domain.Common;
@@ -103,6 +104,7 @@ public PasswordFormat PasswordFormat
103104
/// <summary>
104105
/// Gets or sets a value indicating whether the customer has been deleted
105106
/// </summary>
107+
[Index]
106108
public bool Deleted { get; set; }
107109

108110
/// <summary>
@@ -115,6 +117,7 @@ public PasswordFormat PasswordFormat
115117
/// Gets or sets the customer system name
116118
/// </summary>
117119
[DataMember]
120+
[Index]
118121
public string SystemName { get; set; }
119122

120123
/// <summary>

src/Libraries/SmartStore.Core/Domain/Orders/Order.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations.Schema;
34
using System.Diagnostics;
45
using System.Globalization;
56
using System.Runtime.Serialization;
@@ -429,6 +430,7 @@ protected virtual SortedDictionary<decimal, decimal> ParseTaxRates(string taxRat
429430
/// <summary>
430431
/// Gets or sets a value indicating whether the entity has been deleted
431432
/// </summary>
433+
[Index]
432434
public bool Deleted { get; set; }
433435

434436
/// <summary>

src/Libraries/SmartStore.Data/EfRepository.cs

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,36 @@ public void Update(T entity)
149149
}
150150
}
151151

152+
public void UpdateRange(IEnumerable<T> entities)
153+
{
154+
if (entities == null)
155+
throw new ArgumentNullException("entities");
156+
157+
if (this.AutoCommitEnabled)
158+
{
159+
if (!InternalContext.Configuration.AutoDetectChangesEnabled)
160+
{
161+
entities.Each(entity =>
162+
{
163+
InternalContext.Entry(entity).State = System.Data.Entity.EntityState.Modified;
164+
});
165+
}
166+
_context.SaveChanges();
167+
}
168+
else
169+
{
170+
try
171+
{
172+
entities.Each(entity =>
173+
{
174+
this.Entities.Attach(entity);
175+
InternalContext.Entry(entity).State = System.Data.Entity.EntityState.Modified;
176+
});
177+
}
178+
finally { }
179+
}
180+
}
181+
152182
public void Delete(T entity)
153183
{
154184
if (entity == null)
@@ -158,13 +188,24 @@ public void Delete(T entity)
158188
{
159189
this.Entities.Attach(entity);
160190
}
161-
191+
162192
this.Entities.Remove(entity);
163193

164194
if (this.AutoCommitEnabled)
165195
_context.SaveChanges();
166196
}
167197

198+
public void DeleteRange(IEnumerable<T> entities)
199+
{
200+
if (entities == null)
201+
throw new ArgumentNullException("entities");
202+
203+
this.Entities.RemoveRange(entities);
204+
205+
if (this.AutoCommitEnabled)
206+
_context.SaveChanges();
207+
}
208+
168209
[Obsolete("Use the extension method from 'SmartStore.Core, SmartStore.Core.Data' instead")]
169210
public IQueryable<T> Expand(IQueryable<T> query, string path)
170211
{

src/Libraries/SmartStore.Data/Mapping/Customers/CustomerMap.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public CustomerMap()
1212
this.HasKey(c => c.Id);
1313
this.Property(u => u.Username).HasMaxLength(1000);
1414
this.Property(u => u.Email).HasMaxLength(1000);
15+
this.Property(u => u.SystemName).HasMaxLength(500);
1516

1617
this.Ignore(u => u.PasswordFormat);
1718

src/Libraries/SmartStore.Data/Migrations/201505272236124_V222.Designer.cs

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)