我有以下代码
using System;
using IranKala.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace IranKala.Persistence.Configurations
{
public class PriceConfiguration : IEntityTypeConfiguration<Price>
{
public void Configure(EntityTypeBuilder<Price> builder)
{
builder.HasKey(e => e.PriceId);
builder.Property(e => e.PriceId).ValueGeneratedOnAdd();
builder.HasRequired
}
}
}
,当我尝试使用此enter link description here
时收到以下错误消息entitytypebuilder <>不包含hasrequired的定义