21 lines
1.0 KiB
C#
21 lines
1.0 KiB
C#
using FruitBank.Common.Interfaces;
|
|
using Mango.Nop.Core.Entities;
|
|
using Mango.Nop.Core.Repositories;
|
|
using Nop.Core.Caching;
|
|
using Nop.Core.Configuration;
|
|
using Nop.Core.Events;
|
|
using Nop.Data;
|
|
using Nop.Services.Logging;
|
|
|
|
namespace Nop.Plugin.Misc.FruitBankPlugin.Domains.DataLayer;
|
|
|
|
public class MeasuringItemPalletBaseDbTable<TEntity>(IEventPublisher eventPublisher, INopDataProvider dataProvider, IShortTermCacheManager shortTermCacheManager, IStaticCacheManager staticCacheManager, AppSettings appSettings, ILogger logger) : MgDbTableBase<TEntity>(eventPublisher, dataProvider, shortTermCacheManager, staticCacheManager, appSettings, logger) where TEntity
|
|
: MgEntityBase, IMeasuringItemPalletBase
|
|
{
|
|
protected virtual void BeforeInsertOrUpdate(IMeasuringItemPalletBase measuringItemPalletBase)
|
|
{
|
|
if (measuringItemPalletBase.IsValidSafeMeasuringValues()) return;
|
|
|
|
throw new Exception($"MeasuringItemPalletBaseDbTable->BeforeInsertOrUpdate(); Invalid measuring value(s); {measuringItemPalletBase}");
|
|
}
|
|
} |