Beispiel #1
0
        public static DAO.GroupInfo ToDao(this GroupInfo obj)
        {
            var dao = new DAO.GroupInfo();

            dao.LINK  = obj.LINK;
            dao.Name  = (String.IsNullOrEmpty(obj.Name) ? null : obj.Name);
            dao.Image = (String.IsNullOrEmpty(obj.Image) ? null : obj.Image);

            return(dao);
        }
Beispiel #2
0
        public static GroupInfo ToObj(this DAO.GroupInfo dao)
        {
            if (dao == null)
            {
                return(null);
            }

            var obj = new GroupInfo();

            dao.CloneTo(obj);

            return(obj);
        }
Beispiel #3
0
        public static void CloneTo(this DAO.GroupInfo dao, GroupInfo obj)
        {
            #region Validate parameters
            if (dao == null)
            {
                throw new ArgumentNullException("dao");
            }

            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }
            #endregion

            obj.LINK  = dao.LINK;
            obj.Name  = dao.Name;
            obj.Image = dao.Image;
        }