All Questions
691 questions
0
votes
1
answer
89
views
How to get single row of values from database
Reading multiple values from a Postgres database using npgsql and EF Core in an ASP.NET Core MVC view:
var tulem = await ctx.Database
.SqlQuery<(string Klient, int Krediit, int ...
1
vote
0
answers
63
views
"42883: procedure usp_delete_announcements(integer) does not exist" while calling stored procedure with out paremeters from .NET Core
I am trying to call a PostgreSQL stored procedure with OUT parameters from my .NET Core 3.1 API to delete a record based on an ID. However, when I attempt to execute the stored procedure with OUT ...
4
votes
1
answer
196
views
Polymorphism in Entity Framework Core 9 with PostgreSQL and jsonb column
I am currently working on a database table, that shall contain some base properties of the data and one property that is a jsonb column in the database that can contain different objects that are ...
0
votes
0
answers
45
views
Multi tenancy support for Single database shared schema
We are using a single database with a shared schema multi-tenancy model, as it is the most practical way to support a large number of tenants.
Is there a recommended pattern or approach in Npgsql to ...
0
votes
0
answers
71
views
Database tool in Performance Profiler not working when program is pointed to PostgreSQL
My program in C# using Entity Framework Core I can point to a PostgreSQL or SQLite database. When pointed to PostgreSQL the Database tool of Performance Analyzer does not work. There only appear ...
0
votes
0
answers
46
views
How to pass a user-defined table type (UDT) to a PostgreSQL stored procedure using C# and Npgsql?
I'm trying to pass a user-defined table type (UDT) to a PostgreSQL stored procedure using C# and Npgsql.
Here are the details - PostgreSQL composite type definition:
CREATE TYPE public....
0
votes
0
answers
35
views
Connect ErikEJ Powertools to Google Cloud Postgres Database
Been fighting with this for some time. Normally got around this running a local copy of my database on my local machine to get around all of the Google/SSL insanity. Burned myself on at least one ...
0
votes
1
answer
76
views
CREATE a stored procedure using plain query text via NpgsqlConnection::ExecuteAsync
I am trying to create a stpored procedure via Npsql from C#
private async Task TestExecute(string cmdQuery)
{
var cnnString = $"Server=localhost;User Id=admin;Password=somepass;...
0
votes
0
answers
37
views
Exception "System.IO.IOException" in Npgsql.dll
My project uses .NET Framework 4.0.
During the execution of a program for a certain operation, a message appears in the debugging console: An exception was raised: "System.IO.IOException" in ...
0
votes
0
answers
59
views
Unable to Persist HashSet<T> with jsonb Column Type in EF Core after Upgrading to .NET 9 and PostgreSQL 9.0.1
I'm upgrading a project from .NET 6 to .NET 9 and PostgreSQL to version 9.0.1.
In my domain model, I have the following property:
public HashSet<Guid> Property { get; set; }
In the database, ...
1
vote
0
answers
74
views
Unnest Npgsql bulk query for integer array element
I have a integer[] slots in my PostgreSQL table and would like to use unnest to fill it in bulk.
cmd.CommandText = "INSERT INTO inventory (slots) " +
"SELECT t.slots &...
1
vote
1
answer
736
views
DynamicJson enabling in NpgSql
I have updated few days ago .NET version in my project to 8. Also Npgsql.EntityFrameworkCore.PostgreSQL package have been updated to version 8.0.10.
Some part of my code inserts a class Entity into DB,...
0
votes
0
answers
42
views
Why can't I use a NpgsqlParameter for a channel or a payload in npgsql notify
I want to execute an NOTIFY in a Postgres RDBMS by c# library npgsql.
in SELECTS, INSERTS or UPDATES I used NpgsqlParameters to keep them flexible and save. So I thought, I could also use ...
0
votes
1
answer
243
views
"TimeoutException: Exception while reading from stream" during "dotnet ef database update" using Npgsql with PostgreSQL
I'm trying to update my PostgreSQL database using Entity Framework Core in a .NET application. However, when I run the command dotnet ef database update, I get a TimeoutException with the following ...
1
vote
1
answer
233
views
Npgsql Password Provider only changes the password, not the entire connection string
In NpgsqlDatasourceBuilder, .UsePasswordProvider and .UsePeriodicPasswordProvider only change the password, not the connection string.
Is this the normal behavior of both ?
If so, what is the purpose ...