-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0994116
commit 4e96419
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
Mapping Configuration Factory | ||
============================= | ||
|
||
The MapConfigurationFactory is the mechanism you'll use to register your Mappings within your application. There are a | ||
number of methods available to help you to do so. However the most popular and easiest one to use is the Scan method. | ||
|
||
Scan | ||
---- | ||
|
||
The Scan method makes use of Reflection to query all referenced assemblies to all the Types that implement the IMapTo, IMapFrom and | ||
the ICustomMap interfaces and register them within your application domain. | ||
|
||
To do so ise really easy, for instance if you are working on a Web Application (MVC or API), all you need to do is within you | ||
Configure method is | ||
|
||
:: | ||
public class Startup | ||
{ | ||
public Startup(IConfiguration configuration) | ||
{ | ||
Configuration = configuration; | ||
} | ||
|
||
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | ||
{ | ||
//Set up code for automapper configuration | ||
MapConfigurationFactory.Scan<Startup>(); | ||
} | ||
} | ||
|