Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
106 views

I am trying to define two classes with the same collection-relation, through the same key on a third class, preferably using EF 6 code annotations. I have three tables; Current is a quick reference. ...
Joachim J's user avatar
  • 204
3 votes
0 answers
47 views

I am setting up an automated integration test environment for a large, existing Entity Framework 6 project that uses a MySQL database. My goal is to create a fresh, empty database schema directly from ...
Jason Hunter's user avatar
2 votes
2 answers
116 views

Still on EF 6 "classic" (not core), when I do something like the following: var basicPersonList = myContext.Persons .Select(p => new PersonSimpleData { FamilyName = p....
lidqy's user avatar
  • 2,494
-2 votes
1 answer
97 views

I have a C# (C# 7.5) application that is using EF6. I have a table that contains two foreign keys. Both are one:one relationships and both are required. When I load a record from the database, the ...
AndyW's user avatar
  • 523
1 vote
1 answer
160 views

I have an Order table that contains a nullable foreign key to another table called Product (each order can only map to one product). Each order will only point to one product. The relation is ...
SyndRain's user avatar
  • 3,932
0 votes
0 answers
65 views

After installing Windows 11 Update 24H2, I have not been able to work with a COM Library developed with C# and accessed from Delphi. The failure occurs when I do a Where filter using a numeric ...
KE50's user avatar
  • 564
-1 votes
2 answers
67 views

I'm using VS2022 and have an ASP.NET MVC project with Entity Framework 6. All Nuget packages are current. I have a data connection InstrumentEntities; in the Server Explorer, I can see all the tables ...
TLamb's user avatar
  • 145
1 vote
1 answer
98 views

I need to map an existing database using Entity Framework 6 in order to read (only) data. The model that bugs me is kind of a TPH inheritance strategy where the child type depends on a discriminator ...
Rémi's user avatar
  • 13
1 vote
0 answers
51 views

I'm working on a .NET Framework 4.6.1 application using Autofac (5.2.0) for dependency injection and Hangfire for background jobs. I have a service class StoreDataCleanupService that depends on an EF ...
Ashish's user avatar
  • 25
1 vote
1 answer
62 views

Using Entity Framework 6 in an ASP.NET Core Web API. I have the following controller: [Route("[controller]/[action]")] [ApiController] public class ContactController : ControllerBase { ...
CoderForHire's user avatar
0 votes
0 answers
102 views

I have methods used in IQueryable.Select(...) that shares the same logic of mapping an Entity class to a DTO class, but filter the navigation properties in the projection differently. The problem is ...
SyndRain's user avatar
  • 3,932
0 votes
1 answer
78 views

I have a query that I want to return an entity with a filtered collection navigation property. According to the EF6 document I should be able to load it via explicit loading. However, after the ...
SyndRain's user avatar
  • 3,932
0 votes
2 answers
149 views

Running NbLinksExpirationStatus takes about 12 seconds to execute, which is not fast enough for what i am trying to achieve. Could it be Contains() problem and is there any way i can make it execute ...
mnol's user avatar
  • 33
1 vote
1 answer
238 views

We have a .NET Framework 4.8 application that uses Entity Framework 6. Now we are having a problem that we need to add some tables that don't guarantee any uniqueness (no primary key and rows can ...
SyndRain's user avatar
  • 3,932
1 vote
0 answers
40 views

I have a C# / ASP.NET MVC project using Entity Framework 6. When I am deploying database migrations by running Update-Database -Verbose in the Package Manager Console in Visual Studio, everything ...
Cooper's user avatar
  • 1,370
-1 votes
1 answer
105 views

I have a table ExerciseEnvironments with a unique constraint on a foreign key ExerciseId and type id TypeId combination, where a single exercise can have multiple unique environments but not multiple ...
jpro's user avatar
  • 364
1 vote
1 answer
101 views

We are bulding a console app that needs to read data from some views in an Oracle database, and save that data to an external system. For compatibility reason, we need to use .NET Framework 4.7.2, and ...
john's user avatar
  • 87
1 vote
0 answers
79 views

I have the following classes: public class A { public List<B> bList {get;set;} public List<X> xList {get;set;} } public class X { // data } public class B { public ...
izlin's user avatar
  • 2,139
0 votes
0 answers
33 views

One of the most common filters I apply to a query is to restruct the results to a single (business) organisation e.g. ctx.Users.Where(user => user.OrgID == orgID). I've created the following ...
Chris Walsh's user avatar
  • 3,523
0 votes
0 answers
37 views

I need to create a schema before the first table is created because it relies on it to exist. I have tried Add-Migration CreateSchema with and without the flag -IgnoreChanges and then replaced Up and ...
vilem cech's user avatar
0 votes
0 answers
28 views

I have an Entity Framework 6 (v6.5.1) code-first model like this (type names have been changed to anonymise the code): public abstract class Point { public long ID { get; set; } public long ...
Hydrargyrum's user avatar
  • 3,876
1 vote
1 answer
619 views

I have an Entity Framework 6 model (code-first, with migrations enabled and auto-migrations disabled) in a class library that targets .NET 4.8 and .NET Standard 2.1 (AnyCPU). This is an SDK-style ....
Hydrargyrum's user avatar
  • 3,876
0 votes
1 answer
51 views

I am struggling with EF 6 (for .NET 4.x), code first and SQLite. I am using X# instead of C# but it does only affect the syntax. The problem is that the SQLite database with the table is not created ...
Peter M.'s user avatar
  • 948
1 vote
1 answer
50 views

Background I've recently inherited this ASP.NET 4.8 project. I'm implementing functionality that sets one row in the database as a default record. This is backed by a SQL Server which has an UNIQUE ...
crcollver's user avatar
0 votes
0 answers
37 views

Details: Entity Framework 6.4.4, using Owin and OData. (not sure if that helps with explaining). Asp.net Mvc project, using .net framework 4.7.2 (limitation of legacy projects that cannot be updated ...
user15622687's user avatar
0 votes
1 answer
133 views

In VS2017 I use Microsoft EF6 to connect to a mysql database. When I try to add a new item 'ADO.NET Entity Data Model' in my application 'APP1' there is no way to set up a connection to the mysql ...
tom2051's user avatar
  • 90
0 votes
1 answer
49 views

I am using Entity Framework 6 but the following code is throwing error. The code is migrated from old EF version where it is working fine. using System.Data.Entity; using System.Data.Entity....
Frank Martin's user avatar
  • 3,469
1 vote
1 answer
47 views

I maintain a Breeze ASP.NET Web API that was initially written about 10 years ago. I didn't write it and I'm not an expert in Breeze. The client is a cellphone app developed by a third party. This ...
Ian's user avatar
  • 640
1 vote
0 answers
122 views

I have an EF6 IQueryable<T> which contains a variable in a where clause. I have performance issues with parameter sniffing because the execution plans for some variable values are very ...
Kolti's user avatar
  • 69
0 votes
0 answers
71 views

DateTime todayDateTime = P.getCurrentDateTime(); pmap_attendence customername = db.pmap_attendence .Where(x => x.att_cust_guid.ToString() == input.cust_guid.ToString() && ...
rohit hamlpur's user avatar
0 votes
1 answer
37 views

I'm having some strange issue where I have an EDMX generated from an exisitng DB and the foreign keys are propelry captured within generated classes but upon using them with Include(), I'm getting ...
DoomerDGR8's user avatar
  • 5,112
0 votes
1 answer
2k views

I'm currently looking at upgrading a .NET project (standard moving to .NET 8) that uses Entity Framework (v6.4.4) to EF Core (v8.0.8). For the most part the experience has been painless but I have one ...
Mike's user avatar
  • 1
0 votes
1 answer
65 views

Problem description I have a method that syncs changes to graphs of entities to the database by comparing the received entities with the corresponding database rows and then updates the ChangeTracker ...
Oskar Sjöberg's user avatar
0 votes
1 answer
206 views

If I'm in the middle of doing a bunch of updates within a transaction, and it throws an exception, I still want to log some information in a table in the same db context so I know what happened. I ...
crichavin's user avatar
  • 4,612
0 votes
1 answer
129 views

I am using SQLCipher for sqlite DB encryption in WPF application. As per knowledge they recommend to use Singleton pattern for my DbContext class ensure a single instance is used throughout my ...
user15539024's user avatar
1 vote
1 answer
108 views

Spent huge of time but do not understand why .Include(t => t.Nodes) does not return any Node entities: public class TreeRepository : ITreeRepository { private DataBaseContext dataBaseContext; ...
Pavel Zazulia's user avatar
1 vote
1 answer
40 views

I am trying to write an EF6 LINQ query that takes a DateTimeOffset and retrieves all database entries that have a timestamp with the same local date as the given. The database has all timestamps as ...
RotundChinchilla's user avatar
0 votes
0 answers
558 views

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
30 views

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
45 views

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,274
1 vote
0 answers
346 views

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
  • 713
0 votes
0 answers
55 views

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
212 views

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
95 views

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
4k views

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
38 views

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
1 vote
1 answer
488 views

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
2 votes
1 answer
991 views

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,412
0 votes
1 answer
166 views

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
0 votes
1 answer
84 views

I'm trying to get a date from my database and I've tried different things, but nothing seems to work. This is my date in the database 2024-04-18 19:47:36.337, it's defined as datetime in Microsoft SQL ...
Wrench 8Bits's user avatar

1
2 3 4 5
225