efcore注解
作者:互联网
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace HySamllProjects.Models
{
[Table("ZHSKSB_YS1000")]
public partial class ZhsksbYs1000
{
[Key]
[Column("YSBM")]
[StringLength(6)]
[Unicode(false)]
[Required(ErrorMessage = "医生编码不能为空")]
[Display(Name = "医生编码")]
public string Ysbm { get; set; }
[Required(ErrorMessage = "医生姓名不能为空")]
[Column("YSXM")]
[StringLength(10)]
[Unicode(false)]
[Display(Name = "医生姓名")]
public string Ysxm { get; set; }
[Column(TypeName = "datetime")]
[Display(Name = "创建时间")]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd HH:mm:ss}")]
public DateTime? CreateTime { get; set; }
[Column(TypeName = "datetime")]
[Display(Name = "更新时间")]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd HH:mm:ss}")]
public DateTime? UpdateTime { get; set; }
}
}
标签:set,get,System,Display,efcore,using,注解,public 来源: https://www.cnblogs.com/xlsh/p/16363985.html