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