小编Kar*_*lak的帖子

EF Core 创建多个外键列

我在 .Net Core 3.1 中使用 EF Core

我有一个简单的客户端事件关系示例:

public class BaseEntity
{
    [Key]
    [Required]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }
    public DateTime CreatedOn { get; set; }
    public DateTime? ModifiedOn { get; set; }

}

public class Client : BaseEntity
{

    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Email { get; set; }
    public string Phone { get; set; }

}

public class Event : BaseEntity
{

    public DateTime …
Run Code Online (Sandbox Code Playgroud)

.net c# entity-framework core

3
推荐指数
1
解决办法
1564
查看次数

标签 统计

.net ×1

c# ×1

core ×1

entity-framework ×1