/// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static DAO.MessageProperty ToDao(this MessageProperty obj, DAO.Message msg)
        {
            if (obj == null)
            {
                return(null);
            }

            #region Validate parameters
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            #endregion

            var dao = new DAO.MessageProperty();
            dao.Comment = obj.Comment;
            dao.Format  = obj.Format;
            dao.LINK    = obj.LINK;
            dao.Message = msg;
            dao.Name    = obj.Name;
            dao.Type    = obj.Type;
            dao.Value   = obj.Value;

            return(dao);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="dao"></param>
        /// <returns></returns>
        public static MessageProperty ToObj(this DAO.MessageProperty dao)
        {
            if (dao == null)
            {
                return(null);
            }

            var obj = new MessageProperty();

            obj.Comment     = dao.Comment;
            obj.Format      = dao.Format;
            obj.LINK        = dao.LINK;
            obj.MessageLINK = dao.Message.LINK;
            obj.Name        = dao.Name;
            obj.Type        = dao.Type;
            obj.Value       = dao.Value;

            return(obj);
        }