1
私はこの多くの注釈を流暢なAPIに入れる方法を理解しようとしています。私は列の順序を表す構文を知らない。流暢なAPI列順序sytax
public class UserNotification
{
[key]
[Column(Order = 1)]
public string UserId { get; set;}
[key]
[Column(Order = 2)]
public int NotificationId {get; set;}
public ApplicationUser User{get; set;}
public Notification Notification {get; set;}
}
私は流暢なAPIは次のようになります知っている:次のように
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<UserNotification>()
.HasKey(n => new {n.UserId, n.NotificationId});
// What about the Column Order?
}
ありがとうございます!それは本当に素晴らしいです。私はすぐに勉強しています。 – AllocSystems