Exemplo n.º 1
0
        public static ContentItem MapToContentItem(ContentItem model, HttpRequest request, Guid?id, IContentDefinition contentDefinition)
        {
            model.DefinitionId = contentDefinition.DefinitionId;
            model.Id           = id ?? Guid.NewGuid();

            if (model is ContentFolderItem)
            {
                MapFolder(model, request, contentDefinition);
            }
            else
            {
                MapScalar(model, request);
            }

            if (request.Form.ContainsKey("numbderoffilters"))
            {
                model.Filters.AddRange(ViewModelHelpers.GetFilters(request));
            }

            return(model);
        }
Exemplo n.º 2
0
 public ContentItem MapToModel(ContentItem model, HttpRequest request)
 {
     return(ViewModelHelpers.MapToContentItem(model, request, Item.Id, this.ContentDefinition));
 }