博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
EFDB 基本规范&知识
阅读量:4585 次
发布时间:2019-06-09

本文共 3151 字,大约阅读时间需要 10 分钟。

  

  public abstract class AccountRole //这是继承类型    {        [Key]        public int ID { get; set; }        public bool isDisabled { get; set; }        public string email { get; set; }        public string remark { get; set; }        public string firstName { get; set; }        public string lastName { get; set; }        public string taskss { get; set; }        [ForeignKey("account")]        public int Accounts_id { get; set; }        public virtual Account account { get; set; }        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]        public DateTimeOffset rowCreatedDT { get; set; }        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]        [ConcurrencyCheck]        public byte[] rowVersion { get; set; }        [ForeignKey("rowCreator")]        public int? rowCreatorLoginAccounts_ID { get; set; }        [ForeignKey("rowLastModifiedBy")]        public int? rowLastModifiedByLoginAccounts_ID { get; set; }        public virtual LoginAccount rowCreator { get; set; }        public virtual LoginAccount rowLastModifiedBy { get; set; }    }public class MemberRole : AccountRole //memberROle 继承 accountROle    {        public MemberRole()        {            businessResultComplex = new BusinessResultComplex { };            monthlyTaskComplex = new MonthlyTaskComplex { };        }        public string investorOrIB { get; set; }        public string MT4ID { get; set; }        public string fullName { get; set; }        public DateTime dateOfBirth { get; set; }        public string alternativeEmail { get; set; }        public string contactNumber { get; set; }        public string gender { get; set; }         public BeneficiaryComplex beneficiaryComplex { get; set; } //complex 类型        public AddressComplex addressComplex { get; set; }        public BankComplex bankComplex { get; set; }        public BusinessResultComplex businessResultComplex { get; set; }        public MonthlyTaskComplex monthlyTaskComplex { get; set; }        public DateTimeOffset lastLoginDT { get; set; }  //dateTime原始类型        public DateTime TTDate { get; set; } //date原始类型                        [ForeignKey("currentLevel")]        public int Levels_ID { get; set; }                   public MemberMLMRelationTree MLMRelationTree { get; set; }         public BankBalance bankBalance { get; set; }        public Level currentLevel { get; set; }        public List
historyLogins { get; set; } public List
historyBankTransactions { get; set; } public List
historyLevels { get; set; } public List
withdrawals { get; set; } public List
contracts { get; set; } }  public class HistoryLogin : RowInfo { [Key] public int ID { get; set; } [ForeignKey("member")] public int Members_ID { get; set; } public MemberRole member { get; set; } }

EFDB是sql的结构, 大家都是类型(class), 但是有些时候会有大量重复, 所以会有继承(abstract)

原始类型有 string, int, datetime, date

在类型里可以有其他类型, 如果类型是complex就是一种集合(规范) , list(这是多对多或一对多的关系) , enum

 

转载于:https://www.cnblogs.com/stooges/p/5023756.html

你可能感兴趣的文章
C#基础-第6章:类型和成员基础
查看>>
TextView实现多个TextView对象的走马灯效果
查看>>
感悟成功
查看>>
学员管理示例:Ajax删除学生
查看>>
线程组和未处理的异常
查看>>
Oracle管理监控之为11g asm磁盘组添加磁盘
查看>>
javasrcipt中的for in 循环
查看>>
ThetaSome_ThetaAll子查询
查看>>
BZOJ1499 单调队列+DP
查看>>
用鼠标键盘来控制你的Android手机——同屏显示简单教程
查看>>
文件上传
查看>>
js面向对象
查看>>
在CentOS下面编译WizNote Qt Project
查看>>
android list view 实现动态加载
查看>>
NFS工作原理
查看>>
nginx配置用户认证
查看>>
Kubernetes的Cron Job
查看>>
41岁中兴员工:这可能是我第5次失业_中兴被美国制裁的思考
查看>>
go工程组织规范
查看>>
排序---冒泡排序
查看>>