Example #1
0
        /// <summary>
        /// Toes the CmsCategory view model.
        /// </summary>
        /// <param name="CmsCategory">The CmsCategory.</param>
        /// <returns>New CmsCategory View Model</returns>
        public static CmsCategoryViewModel CmsCategoryToCmsCategoryViewModel(CmsCategory CmsCategory)
        {
            CmsCategoryViewModel model = new CmsCategoryViewModel
            {
                CategoryId = CmsCategory.CategoryId,
                Title = CmsCategory.Title,
            };

            return model;
        }
Example #2
0
        /// <summary>
        /// Froms the CmsCategory view model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns>New CmsCategory</returns>
        public static CmsCategory CmsCategoryViewModelToCmsCategory(CmsCategoryViewModel model)
        {
            CmsCategory CmsCategory = new CmsCategory
            {
                CategoryId = model.CategoryId,
                Title = model.Title,
            };

            return CmsCategory;
        }