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