improvements, fixes, etc...
This commit is contained in:
parent
f502bbaa67
commit
f16cf75a26
|
|
@ -4,17 +4,20 @@ using Nop.Core.Domain.Catalog;
|
||||||
using Nop.Core.Events;
|
using Nop.Core.Events;
|
||||||
using Nop.Data;
|
using Nop.Data;
|
||||||
using Nop.Services.Events;
|
using Nop.Services.Events;
|
||||||
|
using Nop.Services.Logging;
|
||||||
|
|
||||||
namespace Mango.Nop.Core.Repositories;
|
namespace Mango.Nop.Core.Repositories;
|
||||||
|
|
||||||
|
|
||||||
public class MgDbContextBase : IMgDbContextBase
|
public class MgDbContextBase : IMgDbContextBase
|
||||||
{
|
{
|
||||||
|
protected ILogger Logger;
|
||||||
protected INopDataProvider DataProvider;
|
protected INopDataProvider DataProvider;
|
||||||
//protected IHttpContextAccessor HttpContextAccessor;
|
//protected IHttpContextAccessor HttpContextAccessor;
|
||||||
|
|
||||||
public MgDbContextBase(INopDataProvider dataProvider)
|
public MgDbContextBase(INopDataProvider dataProvider, ILogger logger)
|
||||||
{
|
{
|
||||||
|
Logger = logger;
|
||||||
DataProvider = dataProvider;
|
DataProvider = dataProvider;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ using Nop.Core.Domain.Customers;
|
||||||
using Nop.Core.Domain.Orders;
|
using Nop.Core.Domain.Orders;
|
||||||
using Nop.Core.Events;
|
using Nop.Core.Events;
|
||||||
using Nop.Services.Events;
|
using Nop.Services.Events;
|
||||||
|
using Nop.Services.Logging;
|
||||||
using Nop.Web.Framework.Events;
|
using Nop.Web.Framework.Events;
|
||||||
|
|
||||||
namespace Mango.Nop.Services;
|
namespace Mango.Nop.Services;
|
||||||
|
|
@ -11,7 +12,7 @@ namespace Mango.Nop.Services;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents plugin event consumer
|
/// Represents plugin event consumer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MgEventConsumer(IHttpContextAccessor httpContextAccessor) :
|
public class MgEventConsumer(IHttpContextAccessor httpContextAccessor, ILogger logger) :
|
||||||
IConsumer<EntityUpdatedEvent<Product>>,
|
IConsumer<EntityUpdatedEvent<Product>>,
|
||||||
IConsumer<CustomerRegisteredEvent>,
|
IConsumer<CustomerRegisteredEvent>,
|
||||||
IConsumer<OrderPlacedEvent>,
|
IConsumer<OrderPlacedEvent>,
|
||||||
|
|
@ -22,6 +23,8 @@ public class MgEventConsumer(IHttpContextAccessor httpContextAccessor) :
|
||||||
//IConsumer<ModelPreparedEvent<BaseNopModel>>
|
//IConsumer<ModelPreparedEvent<BaseNopModel>>
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
|
protected ILogger Logger { get; } = logger;
|
||||||
private readonly IHttpContextAccessor _httpContextAccessor = httpContextAccessor;
|
private readonly IHttpContextAccessor _httpContextAccessor = httpContextAccessor;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue