Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

How can I instantiate and populate nested/complex objects with Select() in Entity Framework 6?

I am attempting to backport some code written with Entity Framework Core to Entity Framework 6. I've encountered an issue where EF Core can successfully instantiate a complex DTO (i.e. an object with ...
RotundChinchilla's user avatar
-1 votes
0 answers
51 views

Are there any significant drawbacks to directly accessing a DbContext in a Razor View (non-Blazor)? [closed]

In ASP.NET MVC web applications, it is generally recommended to acquire data in the controllers (whether that should involve using a DbContext directly or through a service layer is up for debate), ...
RotundChinchilla's user avatar
0 votes
0 answers
47 views

.NET Framework update to new version - .NET 4 to .NET 4.8 [closed]

I have a project running on .NET 4 and it only runs in Visual Studio 2010 web developer express. I want to upgrade the project to .NET 4.8. There are the steps I followed: Open the solution in VS ...
Mathews Gigi's user avatar
1 vote
0 answers
69 views

How would I use N.EntityFramework.Extensions to insert into another table

I am trying to use the InsertFromQuery() to add data to a SQL table: await cx.Users .Where(x => x.Country == "Romania") .InsertFromQueryAsync("Mailbox", mb => ...
Ginto's user avatar
  • 41
0 votes
1 answer
140 views

SQL query produced by Entity Framework very slow

I have the following query being generated by EF: DECLARE @__term_0 VARCHAR(7) = 'woodrow' DECLARE @__p_1 INT = 0 DECLARE @__p_2 INT = 15 SELECT [t].[Id], [t].[City], [t].[Contact], [t].[CreatedBy], [...
TheIronCheek's user avatar
  • 1,231
1 vote
0 answers
51 views

Mysql ConnectionAttempts increased on AWS RDS after dotnet 6 update to 8

After updating our Dotnet API from dotnet 6 to 8 the connection-attemps on AWS RDS increased significantly (see attached picture). The API is running in a docker-container. We use a MYSQL RDS instance ...
jonny's user avatar
  • 34
1 vote
1 answer
75 views

EF Core populating its navigation although it shouldn't

I am reading the book C#12 In a Nutshell. The author says: Loading navigation properties When EF Core populates an entity, it does not (by default) populate its navigation properties: using var ...
FluidMechanics Potential Flows's user avatar
5 votes
0 answers
118 views

How to manage Entity Framework migrations and databases when using Git version control?

We are planning to use a Gitflow workflow and a shared test database. We currently use EF 6.5.1 and have automatic migrations disabled. Problem: if a developer runs Update-Database (or dotnet ef ...
EMN's user avatar
  • 151
1 vote
2 answers
128 views

C# Entity Framework use value from joined object and only return main object

I am trying to populate a object with additional data from another object with Entity Framework from our data tables. public partial class Maintable { public int Id { get; set; } public int ...
d_88_l's user avatar
  • 47
0 votes
0 answers
124 views

Enum mapping hell PostgreSQL => EF Core 9

I am creating a brand new project to prototype an ASP.NET Core 9 Web API backend with PostgreSQL using the latest Entity Framework Core 9 and Npsgsql 9. Everything was going well until I hit a table ...
Trant's user avatar
  • 3,641
0 votes
0 answers
39 views

I can't create my custom filter in HotChocolate 13.5.0, where can I view detailed documentation or code examples?

I'm trying to create my own filter for a specific type of data in hotchocolate. I created a class from FilterInputType<MyType> and specified an additional field for filtering in it. For this ...
loloskc's user avatar
0 votes
1 answer
89 views

EF Core, Work locally, save/update entire tree of data

I have a TaskFlowTemplate, pretty standard but a bit complex. Our users will have the ability to work locally in memory without need to save after every changes. My primary key is int Id. public class ...
Tobias Gustafsson's user avatar
0 votes
0 answers
69 views

Entity type cannot be tracked error - Entity Framework

I have been messing with this for days now and I'm at a loss. I keep getting The instance of entity type 'LineItemHeader' cannot be tracked because another instance with the key value '{id:1}' is ...
Matt Larson's user avatar
0 votes
1 answer
88 views

How to resolve EF Core continuous migration error with npgsql HiLo?

I'm using Hilo with a custom sequence name. When creating migrations, EF Core always creates a migration to drop the sequence with the normal name. Since EF Core 9.0, this produces a runtime exception ...
Merijn's user avatar
  • 751
1 vote
0 answers
125 views

Orphaned pg_temp_# and pg_toast_temp_# schemas in postgresql 17.5 slow down ORM model update

I am running PG 17.5 Windows using the EDB community distribution. I am using Entity Framework ORM with Devart's dotConnect for PostgreSQL. The issue I am about to describe did not occur under PG 13....
sevzas's user avatar
  • 821

15 30 50 per page
1
2 3 4 5
6125