Esempio n. 1
0
        public int[] GetAllProductVersionId(ProductLocator locator, int page, int pageSize, DateTime date)
        {
            using (new TransactionScope(TransactionScopeOption.Required, new TransactionOptions()
            {
                IsolationLevel = IsolationLevel.ReadUncommitted
            }))
            {
                var productVersions = _context.GetProductVersions(locator, date);

                return(productVersions
                       .Where(x => !productVersions.Any(y => x.DpcId == y.DpcId && x.Id < y.Id) && !x.Deleted)
                       .OrderBy(x => x.DpcId)
                       .Skip(page * pageSize).Take(pageSize)
                       .Select(x => x.DpcId)
                       .ToArray());
            }
        }