实体类格式

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    /// <summary>
    /// 新闻表实体类
    /// </summary>
    public class News
    {
        private string id;
        /// <summary>
        /// 主键自增
        /// </summary>
        public string Id
        {
            get { return id; }
            set { id = value; }
        }
        private string title;
        /// <summary>
        /// 新闻标题
        /// </summary>
        public string Title
        {
            get { return title; }
            set { title = value; }
        }
        private string content;
        /// <summary>
        /// 新闻内容/主体
        /// </summary>
        public string Content
        {
            get { return content; }
            set { content = value; }
        }
        private string createTime;
        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTime
        {
            get { return createTime; }
            set { createTime = value; }
        }
        private string caid;
        /// <summary>
        /// 主键自增
        /// </summary>
        public string Caid
        {
            get { return caid; }
            set { caid = value; }
        }

        public News()
        { 
        }
        public News(string title, string content, string caid)
        {
           
            this.title = title;
            this.content = content;
            this.caid = caid;
        }
        public News(string id, string title, string content, string caid)
        {
            this.id = id;
            this.title = title;
            this.content = content;
            this.caid = caid;
        }
    }
}

 

posted @ 2013-02-19 13:41  觉信  阅读(372)  评论(0编辑  收藏  举报