Found 14 packages
A convenient way to create AutoMapper type mappings using attributes.
Forked from (AutoMapper.Attributes) with fixes.
C# Property Mapper that utilizes attributes in order to perform the mapping. While I personally love auto mappers, I don't like being forced to configure one type to another. In the end, I am just mapping one set of properties to another set of properties. All I care about is that the names match (or I can tell it what name to look for) and the types are assignable. ClassyMapper will do just that!
Attributes for executing AutoMapper after MVC and Web API actions
Additional attributes for AutoMapper.
Mapping Lib similar to automapper that allows for simple and complex mappings via attributes.
Mapping Magic! Automatically generate DTO Classes and AutoMapper Configurations.
Biwen.AutoClassGen
NHibernate automapper configurations with custom attributes and json column support
The object-to-object mapper for C# that can be setup in a readable one-liner. No Attributes, no configuration - just write intuitive and safe code that works immediately.
NeoMapper is a lightweight, generic mapper for .NET 8 and later versions that converts entities to DTOs and vice versa using extension methods and custom attributes.
This is a Sql automatic data mapping library which extends the SqlConnection class. It is intended to be as simple to use as possible through the use of one parameter generic query methods and attributes
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.
A .NET incremental source generator that automatically populates clean POCO domain models from SOAP proxy classes with auto-generated attributes and generates AutoMapper profiles for seamless bidirectional mapping. Features include XmlIgnore support, read-only property handling, init-only properties, XmlChoice/XmlAny patterns, default value preservation, and type-safe property exclusion. No separate attributes assembly required - all attributes are auto-generated!