Example #1
0
        public static coreModels.MenuLinkList ToCoreModel(this webModels.MenuLinkList list)
        {
            var retVal = new coreModels.MenuLinkList();

            retVal.InjectFrom(list);

            foreach (var link in list.MenuLinks)
            {
                retVal.MenuLinks.Add(link.ToCoreModel());
            }

            return(retVal);
        }
Example #2
0
        public static coreModels.MenuLinkList ToCoreModel(this webModels.MenuLinkList list)
        {
            if (list == null)
            {
                throw new ArgumentNullException(nameof(list));
            }

            var retVal = new coreModels.MenuLinkList();

            retVal.InjectFrom(list);

            foreach (var link in list.MenuLinks)
            {
                retVal.MenuLinks.Add(link.ToCoreModel());
            }

            return(retVal);
        }