08 2016 档案

摘要:In 4.2.1 version of AutoMapper and later, AutoMapper provides two APIs: a static and an instance API. The static API: And the instance API: Gathering 阅读全文
posted @ 2016-08-15 21:15 柠檬头 阅读(262) 评论(0) 推荐(0)
摘要:When using an ORM such as NHibernate or Entity Framework with AutoMapper's standard functions, you may notice that the ORM will query all the fields o 阅读全文
posted @ 2016-08-15 21:12 柠檬头 阅读(1139) 评论(0) 推荐(0)
摘要:Projection transform a source to a destination beyond flattening the object model. Without extra configuration, AutoMapper requires a flattened destin 阅读全文
posted @ 2016-08-15 21:08 柠檬头 阅读(138) 评论(0) 推荐(0)
摘要:Null substitution allows you to supply an alternate value for a destination member if the source value is null anywhere along the member chain. This m 阅读全文
posted @ 2016-08-15 21:07 柠檬头 阅读(95) 评论(0) 推荐(0)
摘要:AutoMapper only requires configuration of element types, not of any array or list type that might be used. For example, we might have a simple source 阅读全文
posted @ 2016-08-15 21:06 柠檬头 阅读(118) 评论(0) 推荐(0)
摘要:Mapping Inheritance AutoMapper 1.1 had a method called .Include when creating your maps which allowed AutoMapper to automatically select the most deri 阅读全文
posted @ 2016-08-15 21:06 柠檬头 阅读(128) 评论(0) 推荐(0)
摘要:Flattening One of the common usages of object object mapping is to take a complex object model and flatten it to a simpler model. You can take a compl 阅读全文
posted @ 2016-08-15 21:05 柠檬头 阅读(172) 评论(0) 推荐(0)
摘要:Although AutoMapper covers quite a few destination member mapping scenarios, there are the 1 to 5% of destination values that need a little help in re 阅读全文
posted @ 2016-08-15 21:04 柠檬头 阅读(389) 评论(0) 推荐(0)
摘要:Sometimes, you need to take complete control over the conversion of one type to another. This is typically when one type looks nothing like the other, 阅读全文
posted @ 2016-08-15 21:03 柠檬头 阅读(228) 评论(0) 推荐(0)
摘要:Conditional Object Mapper Conditional Object Mappers make new type maps based on conditional between the source and the destination type. Member Confi 阅读全文
posted @ 2016-08-15 21:00 柠檬头 阅读(203) 评论(0) 推荐(0)
摘要:AutoMapper supports the ability to construct [[Custom Value Resolvers]] and [[Custom Type Converters]] using static service location: Or dynamic servi 阅读全文
posted @ 2016-08-15 20:58 柠檬头 阅读(188) 评论(0) 推荐(0)
摘要:AutoMapper can map to destination constructors based on source members: If the destination constructor parameter names don't match, you can modify the 阅读全文
posted @ 2016-08-15 20:57 柠檬头 阅读(325) 评论(0) 推荐(0)
摘要:Hand rolled mapping code, though tedious, has the advantage of being testable. One of the inspirations behind AutoMapper was to eliminate not just the 阅读全文
posted @ 2016-08-15 18:42 柠檬头 阅读(246) 评论(0) 推荐(0)
摘要:Configuration Create a instance and initialize configuration via the constructor: The instance can be stored statically, in a static field or in a dep 阅读全文
posted @ 2016-08-15 18:40 柠檬头 阅读(272) 评论(0) 推荐(0)
摘要:AutoMapper allows you to add conditions to properties that must be met before that property will be mapped. This can be used in situations like the fo 阅读全文
posted @ 2016-08-15 18:38 柠檬头 阅读(134) 评论(0) 推荐(0)
摘要:Occasionally, you might need to perform custom logic before or after a map occurs. These should be a rarity, as it's more obvious to do this work outs 阅读全文
posted @ 2016-08-15 18:37 柠檬头 阅读(234) 评论(0) 推荐(0)
摘要:Initialization You now must use either or to initialize AutoMapper. If you prefer to keep the static usage, use . If you have a lot of calls everywher 阅读全文
posted @ 2016-08-15 18:34 柠檬头 阅读(368) 评论(0) 推荐(0)
摘要:Bootstrap Tree View A simple and elegant solution to displaying hierarchical tree structures (i.e. a Tree View) while leveraging the best that Twitter 阅读全文
posted @ 2016-08-14 11:27 柠檬头 阅读(2707) 评论(0) 推荐(0)
摘要:MiniProfiler使用笔记 安装步骤 1. Install Package MiniProfiler 2. Install Package MiniProfiler.EF6 3. Install Package MiniProfiler.MVC4 后台配置 1. 在Web.Config文件中添 阅读全文
posted @ 2016-08-14 11:21 柠檬头 阅读(514) 评论(0) 推荐(0)