namespace EgwCoreLib.Lux.Data.Services.Production { public class ProductionBatchService : BaseServ, IProductionBatchService { #region Public Constructors public ProductionBatchService( IConfiguration config, IConnectionMultiplexer redis, IProductionBatchRepository repo) : base(config, redis) { _className = "ProdBatch"; _repo = repo; } #endregion Public Constructors #region Public Methods /// public async Task CreateAsync(ProductionBatchModel entity) { return await TraceAsync($"{_className}.Create", async (activity) => { return await GetOrSetCacheAsync( $"{_redisBaseKey}:{_className}:{entity.ProdBatchID}", async () => await _repo.CreateAsync(entity), FastCache ); }); } #endregion Public Methods #region Private Fields private readonly string _className; private readonly IProductionBatchRepository _repo; #endregion Private Fields } }