首页 新闻 会员 周边

NET RESF 怎么给 数据库字段加 上描述 增加上数据库里面去

0
悬赏园豆:20 [待解决问题]

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace HB.DB.Common
{
    /// <summary>
    /// 用户公告信息表
    /// </summary>
    [Table("usernotify")]
    public class UserNotify
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 用户Id
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 公告Id(关联SystemNotify的主键)
        /// </summary>
        public int NotifyId { get; set; }

        /// <summary>
        /// 读取状态(标记用户是否已经读取该记录)
        /// </summary>
        public bool ReadStatus { get; set; }

        /// <summary>
        /// 请求时间
        /// </summary>
        public DateTime? RequestTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }
}

chenp的主页 chenp | 初学一级 | 园豆:182
提问于:2015-04-10 10:16
< >
分享
所有回答(1)
0

http://stackoverflow.com/questions/6660132/entity-framework-code-first-setting-database-field-decription

幻天芒 | 园豆:37175 (高人七级) | 2015-04-10 10:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册