✅ 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
12 Replies
but you can use the latest version just fine
they target .net standard which should work on .net framework 4.8
ah I see it doesn't let u use tools and design mmm
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
the last version you can get that works on .net fx 4.8 is efcore 5.0.17 which is deprecated because .net 5 is no longer assuming u have no other option but .net framework
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
plus EF6 was a nightmare of repositories
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Hi, all I know it's old, but its an old project written in framework. So I cannot upgrade it at the time.
Thanks anyway.
Just searching for equivalent options to add configurations and so on.
@Bailey your best bet would be asking on the github of EntityFramework imo
GitHub
ef6/src/EntityFramework/ModelConfiguration/EntityTypeConfiguration....
This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore. - dotnet/ef6
it does seem to exist something for that
Thanks,
I know enough.
I will close this thread
$close
Use the /close command to mark a forum thread as answered