140
|
1 using System.Collections.Generic;
|
|
2 using AltNetHispano.Agendas.Domain;
|
|
3 using NHibernate.SqlTypes;
|
|
4
|
|
5 namespace Agendas.NHibernate
|
|
6 {
|
|
7 public class EventoStateType : GenericWellKnownInstanceType<EventoState, string>
|
|
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()
|
|
23 : base(All, (state, id) => state.Descripcion == id, state => state.Descripcion)
|
|
24 {
|
|
25 }
|
|
26
|
|
27 public override SqlType[] SqlTypes
|
|
28 {
|
|
29 get { return new[] {SqlTypeFactory.GetString(25)}; }
|
|
30 }
|
|
31 }
|
|
32 } |