private GigyaDsMappingViewModel Map(GigyaSitefinityDsMapping mapping)
 {
     return(new GigyaDsMappingViewModel
     {
         CmsFieldName = mapping.CmsName,
         GigyaFieldName = mapping.GigyaName,
         Oid = mapping.Oid
     });
 }
        /// <summary>
        /// Maps Sitefinity DS mapping model to a core model.
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        public GigyaDsMapping Map(GigyaSitefinityDsMapping source)
        {
            var mapping = new GigyaDsMapping
            {
                CmsName = source.CmsName,
                Custom  = new Custom {
                    Oid = source.Oid
                },
                GigyaName = source.GigyaName
            };

            var split = source.GigyaName.Split(new char[] { '.' }, 3);

            if (split.Length == 3)
            {
                mapping.GigyaDsType    = split[1];
                mapping.GigyaFieldName = split[2];
            }

            return(mapping);
        }