PageRenderTime 75ms CodeModel.GetById 34ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/src/Otis.Tests/XmlMappings/mappings.xml

http://otis-lib.googlecode.com/
XML | 27 lines | 24 code | 3 blank | 0 comment | 0 complexity | e4532480bc292c8f8e006dee3700920e MD5 | raw file
 1<?xml version="1.0" encoding="utf-8" ?>
 2<otis-mapping xmlns="urn:otis-mapping-1.0">
 3
 4	<class name="Otis.Tests.XmlUserDTO, Otis.Tests" source="Otis.Tests.Entity.User, Otis.Tests" helper="Otis.Tests.Util.Convert" > 
 5		<member name="Id" />		<!-- if expression is ommited it is assumed to be equal to name -->
 6		<member name="Age" />
 7		<member name="UserName" expression="$UserName.ToUpper()" nullValue="&quot;[unknown]&quot;" />
 8		<member name="FullName" expression="$FirstName + &quot; &quot; + $LastName" nullValue="['MISSING_NAME_PART']" />
 9		<member name="Title" expression="['Mr.' + $FirstName + ' ' + $LastName]" />	
10		<member name="ProjectCount" expression="$Projects.Count" />
11		<member name="Gender" expression="$UserGender">
12			<map from="['M']" to="Male" />
13			<map from="['W']" to="Female" />
14		</member>
15		<member name="GenderCode" expression="$UserGender">
16			<map to="['M']" />
17			<map to="['W']" />
18		</member>
19	</class>
20	
21	<class name="Otis.Tests.UserDTO, Otis.Tests" source="Otis.Tests.Entity.User, Otis.Tests" > 
22		<member name="Id" />	
23		<member name="Age" />
24		<member name="BirthDay" format="{0:D}" />
25	</class>
26	
27</otis-mapping>