public static IEnumerable <IDamageReasonState> ToDamageReasonStateCollection(IEnumerable <string> ids) { var states = new List <DamageReasonState>(); foreach (var id in ids) { var s = new DamageReasonState(); s.DamageReasonId = id; states.Add(s); } return(states); }
public IDamageReasonState Get(string id, bool nullAllowed) { IDamageReasonState state = CurrentSession.Get <DamageReasonState> (id); if (!nullAllowed && state == null) { state = new DamageReasonState(); (state as DamageReasonState).DamageReasonId = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IDamageReasonState>(state, new Type[] { }, _readOnlyPropertyNames)); } return(state); }