12,734 questions with no answers
0
votes
0
answers
45
views
error MSB4057: The target "ResolvePackageAssets" does not exist in the project
I tried adding a migration via dotnet ef migrations add InitialCreate but got the following error
C:\Users\tmsta\OneDrive\source\repos\Server Default\TrevorsTempMonitorApp\TrevorsTempMonitorApp.csproj ...
6
votes
0
answers
134
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 ...
0
votes
0
answers
44
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 ...
1
vote
0
answers
148
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....
0
votes
0
answers
52
views
Entity Framework Add-Migration is recreating entire database
I am working on a Blazor Web App using SQL as my database. My initial database migration works fine.
However, when I make a change to one of the model classes, even a simple change, and try and add a ...
1
vote
0
answers
45
views
Updating collection in graph
EF 6. I'm trying to figure out the most fluid way to update an EF graph. So I have a ninja model with a list of NinjaEquipments. Lets say the ninja has three pieces of equipment like the following
...
0
votes
0
answers
141
views
How to set a custom migrations history table name using builder.AddNpgsqlDbContext<AppDbContext>() method in .NET Aspire?
I'm building a .NET Aspire-based application using PostgreSQL with Entity Framework Core. I’m registering my DbContext like this as I am using Aspire.Npgsql.EntityFrameworkCore.PostgreSQL package:
...
0
votes
0
answers
68
views
Running EF Migrations on Visual Studio Publish
I'm looking to publish a code-first Entity Framework project to a non-Azure server for the first time and I'm struggling to get it to actually run migrations. Hopefully, I've missed something really ...
0
votes
0
answers
249
views
"Error: 'The parameter 'frameworkName' cannot be an empty string' when running EF Core Migrations in WinUI project with SQLite (EF Core 8.0)"
I have a WINUI project with local database. When I try Migration with Package Manager Console, it's showing the following error. I had Reference of EFCore,EFcore.Tools,EFCore.Design,EFCore.Sqllite ...
4
votes
0
answers
3k
views
Entity Framework 6 and Effort (Entity Framework Unit Testing Tool) System.ArgumentException : String cannot have zero length
I'm currently trying to write a unit / integration test using Effort as an in memory database provider.
I've been following the tutorial for creating a fake DbContext instance however I'm getting a ...
0
votes
0
answers
74
views
Transport-level error when sending the request to the server(provider: Session Provider, error: 19 - Physical connection is not usable)in ASP.NET MVC5
I am encountering an intermittent issue in my ASP.NET MVC 5 application, where the following error occurs only in production, but not in my development environment (localhost):
A transport-level ...
0
votes
0
answers
68
views
Can I use an interface with a foreign key in EF 6 and set it as a foreign key
I'm using EF 6 with .NET 4.8.
All data entities classes are defined in a Model project so it can be used by client apps. Only User (ApplicationUser) model is defined in the Application project (I'm ...
0
votes
0
answers
81
views
Copy of entity (rollback purpose) before save?
As a newbie in my work I got put in charge of the project for a colleague who left the company. It was his project so this complicates all work because I am quite alone for everything and also I am ...
0
votes
0
answers
64
views
Issue with OAuth Middleware Persisting identity.external Cookie in .NET API with Custom JWT Authentication
I am implementing OAuth authentication (Google & Facebook) in my .NET API using Entity Framework and JWT tokens. I have already set up my own local authentication system with JWT access tokens and ...
1
vote
0
answers
53
views
Using the same DbCompiledModel to create contexts..." with Entity Framework
I have a C# project running from about 8 years without problems.
Using .net 4.8 c# entity framework 6 MySql and SqLite.
This year I would like to upgrade mysql db drivers from version 8 to 9.
After ...
0
votes
0
answers
101
views
MassTransit outbox pattern
I am using the outbox pattern in MassTransit with Entity Framework and RabbitMq in my application.
I found that if I just publish the message to the bus using IPublishEndpoint it will not be published ...
1
vote
0
answers
65
views
How to get CoreWCF to scope a DbContext per call/session?
I am migrating a WPF app service from .NET 4.7.2 to .NET 8. I need some guidance on how to properly manage the lifetime of the DbContext using .NET DI and CoreWCF.
I recently applied the following ...
0
votes
0
answers
922
views
EF6: generic DbConfiguration for different DbContexts
I just updated from EF5 to EF6. This got me introduced to the DbConfiguration, since I needed one of these so that I wouldn't need to add EntityFramework as dependency to my other projects (solution ...
0
votes
0
answers
52
views
System expansion with C# ASP.NET MVC
Currently, I have an employee management system for a certain branch with many functions such as CRUD, export/import of excel files, etc. Now I want to expand it, bringing this system to other ...
0
votes
0
answers
91
views
How to flatten entity graph with date filter
I have two tables, Accounts and Results, that I wish to flatten for my dto. There's a one to many from Accounts as the Results table maintains historic data (for other use cases), but for this project ...
0
votes
0
answers
434
views
An item with with the same key has already been added
I am following a tutorial of model-first approach in ASP.NET MVC in which I am using ADO.NET Entity Model Data, empty EF designer model and when generating the database after defining it's properties ...
2
votes
0
answers
450
views
EF Core 7 Json column projections - LINQKit - LINQ expression could not be translated
I have an issue with mapping an EF Core 7 Json column into an class. I am presented with the following exception.
System.InvalidOperationException: The LINQ expression 'JsonQueryExpression(p....
0
votes
0
answers
47
views
EF Core inherited overriding property not saved with the value given to property
I have a VoucherDefinition class and 4 types derive from that, named:
PublicStaticVoucherDefinition
PublicRandomVoucherDefinition
DedicatedStaticVoucherDefinition
DedicatedRandomVoucherDefinition
...
0
votes
0
answers
60
views
Cannot Use Multiple Context Instances Error in ABP Framework with CommonDbContext Configuration
I'm working using ABP framework and Entity Framework and I have a simple query like this:
// Ensure everything uses the same DbContext (CommonDbContext)
var organizations = await ...
0
votes
0
answers
169
views
DomainEvent published before/after EF SaveChanges
i'm trying to figure out about how to dispatch events in as simple project that uses EF Core.
Base on this, a domain events could be sent before or after saving the changes.
public class ...