Exemple #1
0
        public async Task UpdateAsync(LibrarySalesAreaPassPriority item)
        {
            var entity = await _dbContext.FindAsync <Entities.Tenant.LibrarySalesAreaPassPriority>(
                new object[] { item?.Uid },
                find => find.IncludeCollection(e => e.SalesAreaPriorities))
                         .ConfigureAwait(false);

            if (entity != null)
            {
                _ = _mapper.Map(item, entity, opts => opts.UseEntityCache(_salesAreaByNameCache));

                _ = _dbContext.Update(entity,
                                      post => post.MapTo(item, opts => opts.UseEntityCache(_salesAreaByIdCache)), _mapper);
            }
        }