Enforcing IAggregateRoot (#273)

- Enforcing it on the Async and EfRepositories
- Making CatalogBrand, Item, and Type AggregateRoots because they are
just lookup tables
This commit is contained in:
Eric Fleming
2019-07-11 09:31:18 -04:00
committed by Steve Smith
parent 4706682973
commit 7c092ba5ad
6 changed files with 14 additions and 54 deletions

View File

@@ -12,7 +12,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
/// https://blogs.msdn.microsoft.com/pfxteam/2012/04/13/should-i-expose-synchronous-wrappers-for-asynchronous-methods/
/// </summary>
/// <typeparam name="T"></typeparam>
public class EfRepository<T> : IAsyncRepository<T> where T : BaseEntity
public class EfRepository<T> : IAsyncRepository<T> where T : BaseEntity, IAggregateRoot
{
protected readonly CatalogContext _dbContext;