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