Exemple #1
0
        public IStatusItemState Get(string id, bool nullAllowed)
        {
            IStatusItemState state = CurrentSession.Get <StatusItemState> (id);

            if (!nullAllowed && state == null)
            {
                state = new StatusItemState();
                (state as StatusItemState).StatusId = id;
            }
            return(state);
        }
        public static IEnumerable <IStatusItemState> ToStatusItemStateCollection(IEnumerable <string> ids)
        {
            var states = new List <StatusItemState>();

            foreach (var id in ids)
            {
                var s = new StatusItemState();
                s.StatusId = id;
                states.Add(s);
            }
            return(states);
        }