예제 #1
0
        public static IEnumerable <IContactMechState> ToContactMechStateCollection(IEnumerable <string> ids)
        {
            var states = new List <ContactMechState>();

            foreach (var id in ids)
            {
                var s = new ContactMechState();
                s.ContactMechId = id;
                states.Add(s);
            }
            return(states);
        }
        public IContactMechState Get(string id, bool nullAllowed)
        {
            IContactMechState state = CurrentSession.Get <ContactMechState> (id);

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