public IUserRoleMvoState Get(UserRoleId id)
        {
            IUserRoleMvoState state = CurrentSession.Get <UserRoleMvoState> (id);

            if (state == null)
            {
                state = new UserRoleMvoState();
                (state as UserRoleMvoState).UserRoleId = id;
            }
            return(state);
        }
示例#2
0
        public IUserRoleMvoState Get(UserRoleId id, bool nullAllowed)
        {
            IUserRoleMvoState state = CurrentSession.Get <UserRoleMvoState> (id);

            if (!nullAllowed && state == null)
            {
                state = new UserRoleMvoState();
                (state as UserRoleMvoState).UserRoleId = id;
            }
            if (ReadOnlyProxyGenerator != null && state != null)
            {
                return(ReadOnlyProxyGenerator.CreateProxy <IUserRoleMvoState>(state, new Type[] {  }, _readOnlyPropertyNames));
            }
            return(state);
        }