Found 82 packages
The `ModelMapper` allows to control all XAF components from the application model.
Map any object to the other target object with the same property names
.NET 4.5 The goal of ModelMapper is to make object mapping easy, by automatically determining how one object model maps to another, based on conventions, in the same way that a human would - while providing a simple, refactoring-safe API for handling specific use cases.
A very light library for mapping objects between different types.
Requires Sitecore 10.3 Requires .NET 4.8 Constellation is a collection of utilities for .NET CMS implementers. The Foundation.ModelMapping library is inspired by AutoMapper and is designed to provide a quick, non-ORM method of mapping Sitecore Items to ViewModels. String properties on your ViewModel will be mapped to FieldRendered values from fields with the same names. Integer and DateTime property types can also be handled automatically, although you will not get page editor support for these types. There are a number of Attributes that you can assign to your ViewModel's properties to change the behavior of the Mapper. Usage: var modelMapper = (IModelMapper)ServiceLocator.ServiceProvider.GetService(typeof(IModelMapper)); // Dependency Injection of an IModelMapper is supported TModel viewModel = modelMapper.MapItemToNew<TModel>(sourceItem); Or: TModel viewmodel = item.MapToNew<TModel>(); Or: modelMapper.MapTo(item, model); When using Item or ItemList extensions for mapping, the context IModelMapper is requested from the ServiceLocator, so any moc objects you use for testing are supported with these extension methods. Constraints: - Your ViewModel must have a public, parameterless constructor. - Only Writable, Public Instance properties will be mapped. - Within Sitecore, your field names can be human-legible. ModelMapper will attempt to convert the field name to a valid Property name. Simpler names work best. You can use the Field's Display Name for better human legibility and keep the Field's actual name closer to a legit C# entity name. - ViewModel properties can be: - - Strings - - HtmlStrings (recommended for RichText and FieldRenderer) - - Integers - - Decimals - - DateTimes - - Other ViewModels (recommended for DropLink, DropTree) - - ICollection Generics of other ViewModels (recommended for Multilist, Treelist) - - ModelMapping.Model.ImageModel (for Image Fields, gives access to all field properties and permits generating different kinds of image URLs on the View.) - - ModelMapping.Model.GeneralLinkModel (for General Link fields, gives access to all field properties through a single object.) - - Random Plain Old Classes as long as they are Where T: class, new() The following Model properties are mapped to Item properties rather than Item fields: - ID - Maps to the Item.ID - Make sure you use Sitecore.Data.ID as the property type. - Name - Maps to the Item.Name - DisplayName - Maps to Item.DisplayName - Url - Should be a string, not a Uri. Causes the current context LinkManager to generate a Url for the Item. - Parent - Maps to the ViewModel you provide based on the Item.Parent. Support for XML Field Attributes - ImageField.Alt - use Model.FieldNameAlt - ImageField.Height - use Model.FieldNameHeight - GeneralLink.Target - use Model.FieldNameTarget - etc. Support for LinkField.TargetItem - use Model.FieldNameTargetItem and supply a class with public properties and a parameterless constructor. Support for MultilistField.GetItems - use Model.FieldName and supply a generic ICollection<T> where "T" is new() and has properties you can map. Extensible! See the Constellation.Foundation.ModelMapping.config file to change the way Fields are processed.
Bit.Universal.AutoMapper
This library that contains an extension of DbDataReader that automatically maps a database row to a model.
Faster Mapper (Transformator) for .NET Core 2 (.NET Standart 2) More: https://github.com/gromanev/LynxMapper
Simple & performant model mapping
Package Description
Bit.Universal.AutoMapper.Legacy
A query mapper for OData v4.0, Automapper style. This extension allows you to have a different domain model than your database model, and still be able to pass the OData query down to the database.
A simple object mapper to sharepoint lists, to use with Sharepoint 2010 Object Model
A very simple static mapper. How to use: var viewModel = Mapper.Map<ViewModel>(model); var model = Mapper.Map<Model>(viewModel); var resultList = Mapper.Map<Model>(viewModelCollection); Mapper.CopyProperties(source, target);
Extensions for UmbMapper to allow the mapping of IPublishedContent based classes using the IPublishedContentModelFactory.
StandardMapper is a simple objects/models mapper you can use to tranfer the value of the properties of an object/model into another object/model.
A simple object mapper to sharepoint lists, to use with Sharepoint 2007 Object Model