Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [entity-framework-6]

Do NOT use this tag for Entity Framework Core 6 questions. This tag is for questions about Entity Framework 6, an ORM first released in 2013 and most recently updated to EF6.4 in 2019. It is not the same product as EF Core 6, first released in 2021

entity-framework-6
0 votes
0 answers
9 views

C# .net core 6.0 - IQueryable, odata, and mapped function called from LINQ statement can't be translated

I'm having issues with odata, IQueryable's and mapped functions called from LINQ statements: this is in a function (creating an IQueryable): IQueryable<AvailableView> queryable = _aContext.AView....
JustLooking's user avatar
  • 2,445
0 votes
0 answers
57 views

Converting an application to use Microsoft.Data.SqlClient in Entity Framework instead of System.Data.SqlClient

I've been trying to convert my application (which uses EF) from System.Data.SqlClient to Microsoft.Data.SqlClient to accommodate distributed transactions and I've hit a wall, specifically a dependency ...
ScruffyMagic's user avatar
1 vote
0 answers
19 views

Issue with Conditional Mapping in Abstract and Derived Classes Leading to EF6 SaveChanges Error

The OfType part of the query doesn't work as expected, and there’s an error when saving changes in the database. Code: using System; using System.Data.Entity; using System.Data.Entity....
huhmuren heriid's user avatar
0 votes
0 answers
34 views

Entity Framework migrations: custom initializer not applying migrations as expected

I'm working on an ASP.NET Web API 2 project, using .NET Framework 4.8 and Entity Framework 6, and I'm facing an issue with custom migrations. I need to deal with two situations, one where there is a ...
Paul's user avatar
  • 1,254
0 votes
0 answers
28 views

How to solve transient error when migrating database using PowerShell/EF6 commands?

I am trying to create an Azure DevOps pipeline to migrate database using PowerShell and EF6. Here is my code: steps: - powershell: | $binPath = {some-path} $ef6Exe = $binPath + "\ef6.exe&...
HeyLameRobin's user avatar
0 votes
0 answers
84 views

SQL Server AlwaysEncrypted nvarchar incompatible [duplicate]

I want to use AlwaysEncrypted in a SQL 2016 Standard SP2 server with Entity Framework 6 but my query always fails with this error: Microsoft.Data.SqlClient.SqlException (0x80131904): Operand type ...
sada's user avatar
  • 683
0 votes
0 answers
40 views

Setting many-to-many navigation property to unmodified in EF6

I have an entity Order which has a many-to-many relationship with another entity Material. This relationship is represented by a collection navigation property Materials in the Order entity. Since EF6 ...
Codisattva's user avatar
0 votes
1 answer
41 views

Where is EF6.exe?

According to: Source 1 Source 2 I should be able to find and extract ef6.exe by downloading Entity Framework from this site. After downloading, I am able to change entityframework.6.4.4.nupkg to ...
HeyLameRobin's user avatar
0 votes
0 answers
59 views

Windows Forms numericUpDown control does not update BindingSource

I have a numericUpDown control bound to a binding source. The bindingsource has a datasource that is a binding list of entities queried using Entity Framework. _context.Tasks.Load(); _bindingSource....
GrassConcreteFloor1788's user avatar
0 votes
2 answers
159 views

Getting Microsoft.Data.SqlClient trusted certificate error though not using that driver

I am using Visual Studio 2022 - v17.9.6. When I try to modify or add either a typed dataset or an Entity Framework (v6) model from an existing SQL Server database, I get an error regarding a trusted ...
reuben42's user avatar
0 votes
0 answers
30 views

DbGeometry check for duplicates before insert in db takes too long

I have a problem inserting thousands of data into the database. I need to check if a point with the exact same coordinates has already been inserted, but this operation takes too long, and over time ...
VincenzoRotondi's user avatar
0 votes
0 answers
98 views

Entity Framework 6 - Updating model using Update Wizard and Microsoft Entra (AAD) MFA Interactive

Our team has a database first EF6 project where we need to update the EDMX model from the database schema. Until now we have been using SQL Authentication and have no issues, however we have now moved ...
Prashanth Subramanian's user avatar
0 votes
1 answer
148 views

SQLite "attempt to write a readonly database error" when trying to READ from the database

I'm using Entity Framework 6 (not Core) and System.Data.SQLite. I explicitly connect to the database with ReadOnly=True because I'm only opening it to read from it. The database already exists and is ...
Gerardo Marset's user avatar
0 votes
1 answer
203 views

ProviderIncompatibleException with Npgsql, Postgresql 16.1 and .NET Framework 4.8

I have a legacy Entity Framework application running on .NET Framework 4.8. Until recently, it connected well to Postgresql 11. Now we upgraded Postgresql to 16. We also upgraded the packages Npgsql, ...
LTR's user avatar
  • 1,324
0 votes
1 answer
77 views

How to change the data type of primary key using code first approach?

There was a legacy code base which used GUID as primary key and tables are already present in production and having 10-20 million records. Now, I wanted to change the primary key data type from GUID ...
kaushal sharma's user avatar

15 30 50 per page
1
2 3 4 5
733