Ejemplo n.º 1
0
        public static IList <Business.Blob> TranslateFromServiceToBusiness(DataContracts.BlobCollection serviceItems)
        {
            if (serviceItems == null)
            {
                return(null);
            }

            IList <Business.Blob> businessItems = new List <Business.Blob>();

            foreach (DataContracts.Blob serviceItem in serviceItems)
            {
                businessItems.Add(BlobTranslator.TranslateFromServiceToBusiness(serviceItem));
            }

            return(businessItems);
        }
Ejemplo n.º 2
0
        public static DataContracts.BlobCollection TranslateFromBusinessToService(IList <Business.Blob> businessItems)
        {
            if (businessItems == null)
            {
                return(null);
            }

            DataContracts.BlobCollection serviceItems = new DataContracts.BlobCollection();

            try
            {
                foreach (Business.Blob businessItem in businessItems)
                {
                    serviceItems.Add(BlobTranslator.TranslateFromBusinessToService(businessItem));
                }
            }
            catch (Exception) // Ignory lazy load errors
            {
            }

            return(serviceItems);
        }