public static Business.CreateOrUpdateContainerParameters TranslateFromServiceToBusiness(DataContracts.CreateOrUpdateContainerParameters serviceItem)
        {
            if (serviceItem == null)
            {
                return(null);
            }

            Business.CreateOrUpdateContainerParameters businessItem = new Business.CreateOrUpdateContainerParameters();
            businessItem.Container = ContainerTranslator.TranslateFromServiceToBusiness(serviceItem.Container);

            return(businessItem);
        }
        public CreateOrUpdateContainerResponse CreateOrUpdateContainer(CreateOrUpdateContainerRequest request)
        {
            lock (createOrUpdateContainerActionLock)
            {
                if (createOrUpdateContainerAction == null)
                {
                    createOrUpdateContainerAction = PolicyInjection.Create <BusinessActions.CreateOrUpdateContainerAction>();
                }
            }

            request.CreateOrUpdateContainerParameters.Container.Name = GetUserContainerName(request.CreateOrUpdateContainerParameters.Container.Name);

            BusinessEntities.CreateOrUpdateContainerParameters parameters = CreateOrUpdateContainerParametersTranslator.TranslateFromServiceToBusiness(request.CreateOrUpdateContainerParameters);
            BusinessEntities.CreateOrUpdateContainerResult     result     = createOrUpdateContainerAction.Execute(parameters);

            CreateOrUpdateContainerResponse response = new CreateOrUpdateContainerResponse();

            response.CreateOrUpdateContainerResult = CreateOrUpdateContainerResultTranslator.TranslateFromBusinessToService(result);

            return(response);
        }
        public static DataContracts.CreateOrUpdateContainerParameters TranslateFromBusinessToService(Business.CreateOrUpdateContainerParameters businessItem)
        {
            if (businessItem == null)
            {
                return(null);
            }


            DataContracts.CreateOrUpdateContainerParameters serviceItem = new DataContracts.CreateOrUpdateContainerParameters();
            serviceItem.Container = ContainerTranslator.TranslateFromBusinessToService(businessItem.Container);

            return(serviceItem);
        }