public async Task <Product.Common.Models.CategorySetResponse> GetCategorySet(string id, [FromQuery] Guid?trackingGuid = null)
        {
            _context.Security = new K2SO.Auth.Security(HttpContext.Request.Headers["Authorization"]);
            trackingGuid      = IG2000.Data.Utilities.Logging.CreateLogTrackingHeader(trackingGuid, _context);

            long longId = Utilities.RestErrorHandler.CheckId(id, _context, (Guid)trackingGuid);

            var response = new Product.Common.Models.CategorySetResponse();

            response = await _categorySet.GetById(_context, longId, (Guid)trackingGuid);

            return(response);
        }
        public async Task <Product.Common.Models.CategorySetResponse> PostCategorySet(Product.Common.Models.CategorySetRequest request)
        {
            _context.Security = new K2SO.Auth.Security(HttpContext.Request.Headers["Authorization"]);

            Guid trackingGuid = Guid.NewGuid();

            if (request == null)
            {
                trackingGuid = IG2000.Data.Utilities.Logging.CreateLogTrackingHeader(null, _context, null);
            }
            else
            {
                trackingGuid = IG2000.Data.Utilities.Logging.CreateLogTrackingHeader(null, _context, request.TrackingGuid);
            }

            var response = new Product.Common.Models.CategorySetResponse();

            response = await _categorySet.Save(_context, request, trackingGuid);

            return(response);
        }
        public async Task <Product.Common.Models.CategorySetResponse> PutCategorySet(string id, Product.Common.Models.CategorySetRequest request)
        {
            _context.Security = new K2SO.Auth.Security(HttpContext.Request.Headers["Authorization"]);
            Guid trackingGuid = Guid.NewGuid();

            if (request == null)
            {
                trackingGuid = IG2000.Data.Utilities.Logging.CreateLogTrackingHeader(null, _context, null);
            }
            else
            {
                trackingGuid = IG2000.Data.Utilities.Logging.CreateLogTrackingHeader(null, _context, request.TrackingGuid);
            }

            long longId = Utilities.RestErrorHandler.CheckId(id, _context, trackingGuid);

            var response = new Product.Common.Models.CategorySetResponse();

            response = await _categorySet.Update(_context, longId, request, trackingGuid);

            return(response);
        }