C#C
C#2y ago
Bailey

✅ Entityframework for framework 4.8 instead of .net / core

Hello,

I'm trying to use EF with framework 4.8. There is a version 6.4.4.
When using this, I cant find a lot of options which are available in .net 6 version of EF.

I'm searching for an equivalent of these options. Possible they do not exist.

In this case I'm talking about the following:

override to attach to a config:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration<ProductModel>(new ProductConfiguration());
// etc
The configuration option:


public class ProductConfiguration : IEntityTypeConfiguration<ProductModel>
{
public void Configure(EntityTypeBuilder<ProductModel> builder)
{
builder.ToTable("Products");

builder.HasKey(p => p.ProductId);

builder.Property(p => p.ProductId)
.HasColumnName("ProductId")
.HasColumnType("uniqueidentifier")
.IsRequired();
// etc
Was this page helpful?