A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://automapper.readthedocs.io/en/latest/Understanding-your-mapping.html below:

Website Navigation


Understanding Your Mappings — AutoMapper documentation

Understanding Your Mappings

AutoMapper creates an execution plan for your mapping. That execution plan can be viewed as an expression tree during debugging. You can get a better view of the resulting code by installing the ReadableExpressions VS extension. If you need to see the code outside VS, you can use the ReadableExpressions package directly. This DotNetFiddle has a live demo using the NuGet package, and this article describes using the VS extension.

var configuration = new MapperConfiguration(cfg => cfg.CreateMap<Foo, Bar>(), loggerFactory);
var executionPlan = configuration.BuildExecutionPlan(typeof(Foo), typeof(Bar));

Be sure to remove all such code before release.

For ProjectTo, you need to inspect IQueryable.Expression.

var expression = context.Entities.ProjectTo<Dto>().Expression;

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4