public WX_Message Single(Guid id)
        {
            WX_Message result = new WX_Message();

            _db.Execute(() =>
            {
                result = _db.Single <WX_Message>(m => m.ID == id);
            });
            if (result != null)
            {
                result.Groups = WX_MessageGroupService.instance().GetEnumByMessID(result.ID).OrderBy(m => m.Short);
            }
            return(result);
        }
        public IEnumerable <WX_Message> GetEnumByCID(Guid cid)
        {
            IEnumerable <WX_Message> result = new List <WX_Message>();

            _db.Execute(() =>
            {
                result = _db.GetList <WX_Message>(m => m.CompanyID == cid);
            });
            result.Each(m =>
            {
                m.Groups = WX_MessageGroupService.instance().GetEnumByMessID(m.ID).OrderBy(n => n.Short);
            });

            return(result);
        }