comparison Agendas/trunk/src/Agendas.NHibernate/EventoStateType.cs @ 222:68b09c30b0d2

Separando los test de persistencia en un proyecto aparte
author nelopauselli
date Mon, 19 Sep 2011 18:18:17 -0300
parents 3639803112c6
children
comparison
equal deleted inserted replaced
221:37ddf81333d3 222:68b09c30b0d2
1 using System.Collections.Generic; 1 using AltNetHispano.Agendas.Domain;
2 using AltNetHispano.Agendas.Domain; 2 using AltNetHispano.Agendas.Domain.Repositories;
3 using NHibernate.SqlTypes; 3 using NHibernate.SqlTypes;
4 4
5 namespace Agendas.NHibernate 5 namespace Agendas.NHibernate
6 { 6 {
7 public class EventoStateType : GenericWellKnownInstanceType<EventoState, string> 7 public class EventoStateType : GenericWellKnownInstanceType<EventoState, string>
8 { 8 {
9 public static IEnumerable<EventoState> All
10 {
11 get
12 {
13 return new[]
14 {
15 EventoNullState.GetInstance(), EventoPropuestoState.GetInstance(), EventoAgendadoState.GetInstance(),
16 EventoConfirmadoState.GetInstance(), EventoPublicadoState.GetInstance(), EventoCanceladoState.GetInstance(),
17 EventoDescartadoState.GetInstance()
18 };
19 }
20 }
21
22 public EventoStateType() 9 public EventoStateType()
23 : base(All, (state, id) => state.Descripcion == id, state => state.Descripcion) 10 : base(EventoStateRepository.All, (state, id) => state.Descripcion == id, state => state.Descripcion)
24 { 11 {
25 } 12 }
26 13
27 public override SqlType[] SqlTypes 14 public override SqlType[] SqlTypes
28 { 15 {