Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
375 views

I am using EFCore migrations to alter a postgres db with the Citus extension. I am trying the following steps with my migration: Create the table Call SELECT create_distributed_table etc. Create a ...
Gary F's user avatar
  • 510
-1 votes
1 answer
76 views

[ADO NET Source [2]] Error: Npgsql.NpgsqlException (0x80004005): Exception while reading from stream ---> System.IO.IOException: Unable to read data from the transport connection: A connection ...
SKK's user avatar
  • 43
0 votes
1 answer
70 views

I use Postgresql-14, I have a timestamptz field named 'start_datetime' like below: select start_datetime from table1 2023-08-01 07:00:00.000 +0700 2023-08-01 07:00:00.000 +0700 2023-08-02 07:00:00....
Donald's user avatar
  • 643
0 votes
1 answer
2k views

I'm using Npgsql.EntityFrameworkCore.PostgreSQL 7.0.4 in my console app to persist DateTimeOffset to PostgreSQL Database. However the values stored in my database are always in Local DateTimeOffset. ...
fingers10's user avatar
  • 8,449
0 votes
2 answers
2k views

I am saving a C# DateTime.MinValue to a PostgreSQL column of type timestamp with timezone with EFCore 7.05 and Ngpsql 7.04 Date = {1/01/0001 12:00:00 AM} Kind = Utc When I load the column, the value ...
Xiaoguo Ge's user avatar
  • 2,348
1 vote
1 answer
203 views

I just made a working Get method for Orders combining two methods: This method gets all orders and data associated with it: private async Task<(List<Order>, int)> ...
PhantomPhreak1995's user avatar
1 vote
1 answer
2k views

I use YugabyteDB, it's compatible with PostgreSQL, so I can just use Npgsql. I have confusion with managing DbConnection. I know EntityFramework creates new connection per request, but I use Dapper ...
Szyszka947's user avatar
  • 1,048
0 votes
2 answers
40 views

I am developing a small application. I could not create the database as an idea. My data will be as follows, should I create separate tables for them or should I use them in a single table using The ...
Mertau's user avatar
  • 3
0 votes
0 answers
853 views

I need help on connecting to my friend's PostgreSQL server through my team's project using C# and WinForms in VS Community with Npgsql as the NuGet Package. The problem always shows when we try to ...
jhun mcgee's user avatar
0 votes
1 answer
118 views

I am trying to do bulk insert data in postgres using Binary copy, as below await connection.BeginBinaryImportAsync($"COPY ph_numbers FROM STDIN (FORMAT BINARY)); This table already contains ...
Amit Kumar's user avatar
1 vote
1 answer
2k views

We have a production app that is growing every day more and it is managing a lot of asynchronous requests. We had backend composed by a PostgreSQL database and an ASP.NET Core 6 Web API. The backend ...
E.Benedos's user avatar
  • 1,831
0 votes
2 answers
290 views

I just wanted to know what would happen if there are multiple insert and update statements like (insert into sales(),insert into saledetails(), update sale etc.) getting executed and if any exception ...
Manjay's user avatar
  • 19
4 votes
1 answer
625 views

I'd like to get clarification on whether parameterized queries are the same as prepared statements in Npgsql. If I write the following, without an explicit cmd.Prepare(): var cmd = new NpgsqlCommand(&...
Zephyr's user avatar
  • 83
3 votes
1 answer
393 views

We need to support both databases: SQL Server and Postgresql. For optimistic concurrency we use a [Timestamp] column. For SQL Server this code works: public class DbEntity { ... [Timestamp] ...
Alex T's user avatar
  • 2,195
1 vote
0 answers
60 views

Warning: This software is kinda antique (PostgreSQL 10, Npgsql 2) but I intend to test it against the newer software. The database timezone from postgresql.cof is 'GMT'. The Windows timezone is ...
NightCity10932's user avatar
0 votes
0 answers
532 views

I have a .NET 6 C# console app connected to Denodo using Npgsql. The main task is just to pull data with SELECT using different queries. Now I'm facing an error with one of the largest queries with ...
MarioG's user avatar
  • 25
0 votes
0 answers
1k views

In EF Core's derived DbContext, in the OnModelCreating(ModelBuilder modelBuilder) method, I can get all entity types defined in the model by calling modelBuilder.Model.GetEntityTypes(). My problem is ...
Andrew's user avatar
  • 1,289
1 vote
1 answer
1k views

I've got a question about behaviour of NpgSql connections and transactions. If I have an open connection that has had a transaction started on it through "BeginTransactionAsync", and I then ...
Kieran Benton's user avatar
0 votes
0 answers
122 views

I'm using Entity Framework to add test data to an integration database. I then read this out directly with NpgSql (easier to write PostGis queries direct in text). One of the string properties of my ...
Dafydd Giddins's user avatar
0 votes
1 answer
115 views

I have a function in SQL that returns a number. This function is called some_number. I also have a DbSet<Table>: class Table { public string Name { get; set; } } Now i want to give the ...
Philskillz's user avatar
0 votes
0 answers
2k views

I'm new with Npgsql, my C# Code like below: Do I still need to use: conn.Open(); conn.Close(); if I already use using statement?, I have try to remove it but nothing happen. try { ...
Don2's user avatar
  • 387
-1 votes
1 answer
108 views

download zip from https://github.com/npgsql/npgsql unzip Open Npgsql.sln Build Solution Have many errors 1>------ Build Started: Project: Npgsql.SourceGenerators, Configuration: Debug Any CPU -----...
destroyer86's user avatar
0 votes
1 answer
577 views

Using Npgsql, I am trying to create a Postgresql enum type and then to do a binary import from .NET. Project file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <...
fra_pero's user avatar
  • 113
0 votes
1 answer
1k views

I'm attempting to run an EF migration against my PostgreSQL database using Npgsql and code that's similar to what I've used in other projects: var applicationContextOption = CreateContextOption<...
A N's user avatar
  • 305
4 votes
1 answer
2k views

Looking for a code first way of using a context to generate the sql script to migrate from one specific migration to another. I cant seem to find this online. something like context.Database....
Daniel Goldberg's user avatar

1
3 4
5
6 7
44