Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.NHibernate/NhHelper.cs @ 147:5a1f7233aa5a
Agregando algunos tests
author | Nelo@Guinea.neluz.int |
---|---|
date | Mon, 01 Aug 2011 17:34:35 -0300 |
parents | 2dbb15f4510f |
children | 5346c0500594 |
comparison
equal
deleted
inserted
replaced
146:3ca9fb66d397 | 147:5a1f7233aa5a |
---|---|
34 | 34 |
35 var mapper = new Mapper(orm); | 35 var mapper = new Mapper(orm); |
36 | 36 |
37 mapper.Customize<Persona>(a => a.Property(p => p.Nombre, m => m.Unique(true))); | 37 mapper.Customize<Persona>(a => a.Property(p => p.Nombre, m => m.Unique(true))); |
38 mapper.Customize<Persona>(a => a.Property(p => p.Twitter, m => m.Unique(true))); | 38 mapper.Customize<Persona>(a => a.Property(p => p.Twitter, m => m.Unique(true))); |
39 | |
40 mapper.Customize<Evento>(a => a.Property(p => p.Titulo, m => m.Unique(true))); | |
39 | 41 |
40 mapper.AddPropertyPattern(p => p.DeclaringType == typeof(Evento) && p.Name == "Estado", a => a.Type<EventoStateType>()); | 42 mapper.AddPropertyPattern(p => p.DeclaringType == typeof(Evento) && p.Name == "Estado", a => a.Type<EventoStateType>()); |
41 | 43 |
42 var mapping = mapper.CompileMappingFor(typeof(Evento).Assembly.GetTypes()); | 44 var mapping = mapper.CompileMappingFor(typeof(Evento).Assembly.GetTypes()); |
43 | 45 |