App.Models.PageViewModel.PageViewModel C# (CSharp) Method

PageViewModel() public method

public PageViewModel ( IPublishedContent model ) : System
model IPublishedContent
return System
        public PageViewModel(IPublishedContent model)
        {
            Id = model.Id;
            Name = model.Name;
            Url = model.Url;
            Path = model.Path;
            ContentTypeAlias = model.ContentType.Alias;
            CreateDate = model.CreateDate;
            Template = model.GetTemplateAlias();
            TemplateId = model.TemplateId;
            Properties = new Dictionary<string,PropertyViewModel>();
            foreach(var x in model.Properties) {
                Properties.Add(x.PropertyTypeAlias, new PropertyViewModel() { DataValue = x.DataValue, HasValue = x.HasValue, PropertyTypeAlias = x.PropertyTypeAlias, Value = x.Value, XPathValue = x.XPathValue });
            }
        }
PageViewModel