C
C#10mo 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
12 Replies
leowest
leowest10mo ago
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
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
leowest
leowest10mo ago
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
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
leowest
leowest10mo ago
plus EF6 was a nightmare of repositories
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
Bailey
BaileyOP10mo ago
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.
leowest
leowest10mo ago
@Bailey your best bet would be asking on the github of EntityFramework imo
leowest
leowest10mo ago
it does seem to exist something for that
Bailey
BaileyOP10mo ago
Thanks, I know enough. I will close this thread $close
MODiX
MODiX10mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server