How to get license terms for Entity Framework 4.3.0 nuget package and also source code?
Hello, I am not sure if this is right forum for this question. What i need is the license terms from Microsoft for using the Entity Framework 4.3.0 nuget package in the application which is disctributed commercially. Also, since Entity Framework is…
EF Core AUTO_INCREMENT problem with MySQL database
The only problem i have now that i finished my database design is that the AUTO_INCREMENT is not specified when creating the tables by EF Core. This is the modelBuilder modelBuilder.Entity<Conturi>(entity => { …
Entity Framework complains that there is no primary key
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace WpfApp6.Models; public partial class Product [Key] public int IdProduct { get; set; } public string NameOfProduct { get; set; } = null!; public…
Inserting data in many to many relation ship in EF core
i have two tables 1-Employees (ID ,EmpName) 2- Project (ID,ProjectName) data is already inserted in boh tables ,there is many to many relationship between these two so middle table created in table i.e EmployeesProject now i want to insert data (keys of…
Add-Migration works, but Update-Database says "no migrations to update". I tried deleting the Mig.. Folder
Visual Studio and EF Core problem. Migrations don't work. Add-Migration Title works to update the schema, but Update-Database in NuGet Command Console says that the db is already up to date, but the db does not have my new table in it. I tried…
How can I save a collection of CultureInfo type using EF Core without adding backing fields?
In a class, I have a collection of type List<CultureInfo> OfficialLanguages. I need to respect domain driven design for this project. I cannot add a backing field of type List<string> officialLanguagesCodes and handle it that way. When I have…
EF Core - High Memory Usage For Query that Runs for 20 seconds
I'm wondering if there is a better way to optimize the below query. Granted, it's pulling in 80,000 - 160,000 records, but the RAM usage on my web server, shoots up to ~3gig while it's running for a total of 20 seconds, when testing it in my API, but,…
BulkInsert for Entity Framework Core
Entity Framework core now has ExecuteUpdate and ExecuteDelete for doing large updates and deletes But when is EF core going to get the much need BulkInsert that does the job of SQL SERVER's BCP There are third party tools, but they are very expense…
How to save a many to many relationship with Entity Framework
Hi, I have a many to many relationship between Flight and Journey, so I have created an intermediate table to create the relationship: the thing is, I have a list of flights and one Journey, so how can I create the code to make the assembly so I can…
How to fix Add-Migration problem?
Hi, I am trying to add another entity to the database in my e-commerce solution which includes client and admin projects using Blazor WASM and Server, Asp.Net Core API, and data access projects. However, I am getting an error message as shown below: How…
.Net core application with EFCore using Sqlite DB on linux giving error "Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 14: 'unable to open database file'."
I'm running a simple .Net Core application on Linux using EFCore and SQLite, but I'm getting the following error: An exception occurred while iterating over the results of a query for context type 'ApplicationDbContext'. …
EntityFrameworkCore 7 SetProperty(avar,avalue) Unable to cast object of type 'System.Linq.Expressions.TypedParameterExpression' to type 'System.Linq.Expressions.LambdaExpression'.
My code: 1.Error ADal aDal = new ADal(); Func<AModel, float> p = property => property.Balance; aDal._databaseContext .ModelDbSet .Where(w => w.ID == 5) .Take(1) .ExecuteUpdate(e => e.SetProperty(p, 636)); Out error (Almost no answer…
EF Core .Net 8 error after TLS 1.0 was disabled.
The admins where I work have disabled TLS 1.0 but now all of a sudden, my .Net 8 app is getting the following error: Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred…
Queries with EF Core causes 'Cannot continue the execution because the session is in the kill state'
Some EF Core queries are throwing the following error in our code : Cannot continue the execution because the session is in the kill state. Une erreur grave s'est produite pendant la commande actuelle. Les résultats devront être supprimés, le cas…
How to exclude matching records in EF Core Database
I've been working on a project from a gentleman that is no longer on my team. We want to have the below code running as a Windows Service, running every 5 minutes (easy for me to do the Service). However, if we run the below code in our API, manually…
Access failed to localdb using EFCore in vs2022
Hi, I created my first Avalonia UI app in MVVM pattern and already installed EFCore 8.0.6 in the project. But failed to access the localdb. My troubleshoot: Created a simple console project. No issue. See attached pic1. In Avalonia app, checked the…
My EmailConfirmed is not working
Hi, I'm new to this, so I'm not so good, your help is my pleasure, thank you. I am having a problem with login, the API emailConfirmed still works when I give it token and userId. As far as I know, the EmailConfirmed doesn't confirm itself. I think I…
A second operation was started on this context instance before a previous operation completed. This is usually caused by different threads concurrently using the same instance of DbContext
I have a project using Azure Function with ASP.NET Core 8 and Service Bus, for data access I use EF Core. I'm getting hit a lot and we still haven't found the cause of the error: "A second operation was started on this context instance before a…
Entity Framework bulk functionalities (bulk insert,bulk delete)
I'm currently working on an enterprise project that requires some logic for bulk functionalities using Entity Framework. We found a couple of options but both are under licence: EF. Core.BulkExtensions…