followpp.png
ValueInjecter lets you define your own convention-based matching algorithms (ValueInjections) in order to match up (inject) source values to destination values.

basic usage:

using Omu.ValueInjecter;

myObject.InjectFrom(anyOtherObject);

//inject from multiple sources
a.InjectFrom(b,c,d,e);

//inject using your own injection
a.InjectFrom<MyInjection>(b);
ValueInjecter is used in http://prodinner.codeplex.com (ASP.net MVC sample app) for mapping models to viewmodels and back, see the app live at : http://prodinner.aspnetawesome.com
step by step explanation
flattening, unflattening
Faster Deep Cloning using SmartConventionInjection and FastMember
Data access layer (ORM) with the Value Injecter
Useful injections
for testing
Automatic mapping tests for EF4 Code First Entities
Mapping IDataReader to object
max performance with the SmartConventionInjection
Automapper Simulation with the ValueInjecter Download Test Project

if there is any questions please do ask on stackoverflow tag valueinjecter

blogs about ValueInjecter

http://sampathloku.blogspot.co.uk/2012/11/how-to-use-valueinjecter-with-aspnet.html
http://zootfroot.blogspot.co.uk/2012/06/custom-valueinjecter-injection-to-use.html
http://blog.aquabirdconsulting.com/?p=318
http://jachman.wordpress.com/2011/08/10/using-automapper-config-with-valueinjecter/
http://zootfroot.blogspot.com/2012/01/valueinjecter-matching-nullable-to-non.html
http://www.pedroruisilva.com/blog/?p=114
http://www.i-script.nl/?tag=valueinjecter
http://noocyte.wordpress.com/2011/10/28/valueinjecter-and-expression-magic/
http://stackoverflow.com/questions/4663577/automapper-vs-valueinjecter
(let me know if there is more)

ValueInjecter samples (available in the downloads):

asp.net-mvc application

mvc.png

winforms flattening/unflattening

winflat.png

asp.net webforms

webforms.png

silverlight

silver.png

wpf

wpf.png

Data Access

dal.png

With great power comes great responsibility

Last edited Mar 11, 2013 at 6:48 PM by o, version 119