Structr
  • Welcome
  • Utilities
    • Abstractions
      • Check
      • Ensure
      • Money
      • HierarchyId
      • Providers
        • SequentialGuidProvider
      • Extensions
        • DateTime
        • Dictionary
        • DirectoryInfo
        • Enumerable
        • Enum
        • Expression
        • Int
        • Long
        • MemberInfo
        • Object
        • Queryable
        • ServiceCollection
        • String
        • Type
      • Helpers
        • AsyncHelper
        • BindHelper
      • JsonConverters
        • DateOnly
        • TimeOnly
        • StringNumber
    • Collections
      • AutoMapper extensions
    • IO
      • FileHelper
      • MimeTypeHelper
      • PathHelper
      • SequentialFileName
    • Configuration
      • Providers
        • JSON-file
        • XML-file
        • In-Memory
        • Consul
      • Get settings
      • Set settings
      • Customization
    • Email
      • Razor
    • Navigation
      • Menu
      • Breadcrumbs
    • Security
  • Domain
    • Domain
      • Entities
      • Value objects
  • Data Access
    • Entity Framework Core
    • Entity Framework 6
  • Use Cases
    • Operations
      • Filtering
      • Decoration
    • Notices
    • Validation
    • Specifications
    • Stateflows
      • StateMachine
      • Configurations
  • Presentation
    • ASP.NET Core
      • Client
      • Http
      • JavaScript
      • Json
      • Mvc
      • Referrer
      • Rewrite
      • Routing
      • TagHelpers
      • Validation
Powered by GitBook
On this page
  • Installation
  • Usage

Was this helpful?

Edit on GitHub
  1. Utilities
  2. Collections

AutoMapper extensions

PreviousCollectionsNextIO

Last updated 2 years ago

Was this helpful?

-related extensions for working with different types of collections.

Installation

Collections package is available on .

dotnet add package Structr.Collections.Extensions.Automapper

Usage

Provided extensions allow to perform one-string mappings between collections without a redundant code.

var list = new List<Foo>
{
     new Foo { Id = 1, Name = "Bar"},
     new Foo { Id = 2, Name = "Baz"}
};
var mappedCollection = mapper.MapList<FooDto>(list);
Automapper
NuGet