C
C#4mo 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
leowest4mo 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 User4mo ago
Message Not Public
Sign In & Join Server To View
leowest
leowest4mo 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 User4mo ago
Message Not Public
Sign In & Join Server To View
leowest
leowest4mo ago
plus EF6 was a nightmare of repositories
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Bailey
Bailey4mo 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
leowest4mo ago
@Bailey your best bet would be asking on the github of EntityFramework imo
leowest
leowest4mo ago
it does seem to exist something for that
Bailey
Bailey4mo ago
Thanks, I know enough. I will close this thread $close
MODiX
MODiX4mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server
More Posts
AutoMapper: Ignoring Nested Property in Mapping Configuration Results in Null ValueI'm encountering an issue with AutoMapper where I'm trying to ignore a nested property during mappinAny Methods to Obtain POSIX Thread Handle for System.Threading.Thread in LinuxSo I am trying to find a way to obtain the pthread (POSIX thread) handles for my threads. I found a trying to deploy my app with docker with my problemsSo i have my container running, and when I go to localhost:8080 where the docker is running, it take.NET tool/library for communication/network loggingHye guys, I was asked to do some "research" to find some fancy/cool way to logging communication betstruggling with objects and methods```cs class Circle { float radius; int id; int nextID; static void initCircle() .runsettings Coverage Pattern Not WorkingHello can someone please help me fix my runsettings to only collect from the "Controllers" folder: `✅ How can I convert/flatten an 8-Digit Hex color (Alpha) to a 6-Digit Hex color (Assuming white BG)Does anyone here know how to convert an 8-Digit HEX color code to a 6-Digit HEX color code (AssumingAzure video analyzer:blue_siren: :blue_siren: Is there any azure service that I can use to analyze a video's content? IBlazor Server and Client app, Azure questionI have Blazor Server and Client app. I deployed it on Azure Web App (not static). When I open the cLoop is returning the completely wrong value.I am using the Linqpad to test a pricing algorithm but the result at the is completely wrong. Instea