automapperdev - AutoMapper.EF6 2.0.0

Extensions to make AutoMapper easier to work with Entity Framework. Project to collections and items, decompiling calculated properties along the way

PM> Install-Package AutoMapper.EF6 -Version 2.0.0 -Source https://www.myget.org/F/automapperdev/api/v3/index.json

Copy to clipboard

> nuget.exe install AutoMapper.EF6 -Version 2.0.0 -Source https://www.myget.org/F/automapperdev/api/v3/index.json

Copy to clipboard

> dotnet add package AutoMapper.EF6 --version 2.0.0 --source https://www.myget.org/F/automapperdev/api/v3/index.json

Copy to clipboard
<PackageReference Include="AutoMapper.EF6" Version="2.0.0" />
Copy to clipboard
source https://www.myget.org/F/automapperdev/api/v3/index.json

nuget AutoMapper.EF6  ~> 2.0.0
Copy to clipboard

> choco install AutoMapper.EF6 --version 2.0.0 --source https://www.myget.org/F/automapperdev/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "automapperdev" -SourceLocation "https://www.myget.org/F/automapperdev/api/v2"
Install-Module -Name "AutoMapper.EF6" -RequiredVersion "2.0.0" -Repository "automapperdev" 
Copy to clipboard

AutoMapper.EF6

Extensions for AutoMapper and EF6

NuGet MyGet

This contains some useful extensions I've used with AutoMapper and EF6. Instead of this:

Mapper.CreateMap<Employee, EmployeeDto>()
  .ForMember(d => d.FullName, opt => opt.MapFrom(src => src.FirstName + " " + src.LastName));

var employees = await db.Employees.ProjectTo<EmployeeDto>().ToListAsync();

You can do this instead:

public class Employee {
  [Computed]
  public string FullName { get { return FirstName + " " + LastName; } }
}
Mapper.CreateMap<Employee, EmployeeDto>();

var employees = await db.Employees.ProjectToListAsync<EmployeeDto>();

This package wraps up calling ProjectTo, the DelegateDecompiler Decompile/DecompileAsync methods, and then the LINQ methods to execute the queryable (ToList, ToArray, Single, SingleOrDefault etc).

  • .NETFramework 4.6.1
    • AutoMapper (>= 8.0.0)
    • DelegateDecompiler.EntityFramework (>= 0.28.0)
    • EntityFramework (>= 6.4.4)
  • .NETStandard 2.1
    • AutoMapper (>= 8.0.0)
    • DelegateDecompiler.EntityFramework (>= 0.28.0)
    • EntityFramework (>= 6.4.4)
  • .NETFramework 4.6.1: 4.6.1.0
  • .NETStandard 2.1: 2.1.0.0

Owners

Jimmy Bogard

Authors

Jimmy Bogard

Project URL

https://github.com/AutoMapper/AutoMapper.EF6

License

MIT

Tags

EntityFramework AutoMapper

Info

18 total downloads
1 downloads for version 2.0.0
Download (11.44 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
3.0.0 9.86 KB Wed, 21 Jun 2023 18:48:49 GMT 3
2.1.2-alpha.0.6 9.93 KB Wed, 21 Jun 2023 18:44:11 GMT 1
2.1.2-alpha.0.5 11.49 KB Sun, 15 Jan 2023 15:30:37 GMT 3
2.1.1 11.42 KB Mon, 09 Aug 2021 12:35:29 GMT 2
2.1.1-alpha.0.3 11.47 KB Fri, 16 Jul 2021 10:47:47 GMT 1
2.1.1-alpha.0.2 11.5 KB Thu, 03 Dec 2020 16:16:48 GMT 3
2.1.1-alpha.0.1 11.5 KB Thu, 03 Dec 2020 16:13:24 GMT 1
2.1.0 11.45 KB Thu, 03 Dec 2020 15:09:30 GMT 3
2.0.0 11.44 KB Thu, 03 Dec 2020 14:54:09 GMT 1