| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | using SQLite.CodeFirst;using System;using System.Collections.Generic;using System.ComponentModel;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema;using System.Linq;using System.Text;using System.Threading.Tasks;namespace XdCxRhDW.Entity{    public abstract class BaseEntity    {        public BaseEntity()        {            this.CreateTime = DateTime.Now;            this.UpdateTime = DateTime.Now;        }        [Key]   // 主键        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]       // 自增列        [Autoincrement]        [Display(Name ="编号")]        public int ID { get; set; }        [Display(Name = "创建时间")]        public DateTime CreateTime { get; set; }        [Display(Name = "更新时间")]        public DateTime UpdateTime { get; set; }    }    public abstract class BaseEntity<TID>    {        public BaseEntity()        {            this.CreateTime = DateTime.Now;            this.UpdateTime = DateTime.Now;        }        [Display(Name = "编号")]        [Key]   // 主键        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]       // 自增列        [Autoincrement]        public TID ID { get; set; }        [Display(Name = "创建时间")]        public DateTime CreateTime { get; set; }        [Display(Name = "更新时间")]        public DateTime UpdateTime { get; set; }    }}
 |