Skip to main content

All Questions

Tagged with
-1 votes
0 answers
41 views

Postgres error establishing an SSH connection to database

I'm using the following code to establish a connection to a Postgres database: MemoryStream keyStream = new MemoryStream(System.IO.File.ReadAllBytes("C:\\Users\\NelsonSoares\\Documents\\Trino\\...
Nelson Soares's user avatar
0 votes
0 answers
52 views

AddRange/SaveChanges won't add data to database

My current task is to transform a huge tree-like structure to simple table (which i just created and it's empty) with each node having a parent Id and each node having an shared ancestor Id (if node ...
Nkwitchoua's user avatar
1 vote
0 answers
17 views

Pass data to PostgreSQL database from back end error

int roleId = 0; int maxRoleId = 0; int maxTempRoleId = 0; int result = 0; try { using (DBConnector oCloudConnection = new DBConnector(connectionValues[0], Convert.ToInt32(connectionValues[1]))) ...
Vinuka Osura's user avatar
1 vote
0 answers
75 views

Some PostgreSQL tables are not accessible from application using Npgsql, C#/ASP.NET

Background I am currently writing the server-side application for an online turn-based in-browser game. I have set up a PostgreSQL database with a variety of tables within the default public schema ...
zai-turner's user avatar
2 votes
1 answer
164 views

EF Core Primary key check through exception handling

I would like to insert new entries into a database without verifying that the entry already exists through a separate query (e.g. a get query etc). I have something similar to the code below and it ...
Moritz Hartmann's user avatar
0 votes
1 answer
233 views

I want to Convert my LINQ query to PostgreSQL query

var barcodePost = await _barcodePostRepository.FindAsync(barcodeSpec); var barcodeQuantity = barcodePost?.GroupBy(b => b.BarcodeNumber) .Select(g => new { ...
Farhan Patel's user avatar
1 vote
1 answer
100 views

implement bulk copy in different environment

I have a problem about bulk copy command in PostgreSQL. For instance i have a sample command of copying file CSV to table like below CREATE TEMPORARY TABLE AlterTable ( a1 varchar(50), a2 ...
proram013's user avatar
0 votes
1 answer
87 views

Why is EF one-to-one relationship deleting the parent upon adding of child?

I have been working with Entity Framework for a while now using only one-to-many relationships with a code-first approach. However, I have now reached a point where I want to implement a one-to-zero/...
Pile's user avatar
  • 27
1 vote
2 answers
727 views

How do you update parent entities LastUpdate property when adding or changing a child at any level in the hierarchy below it in Entity Framework?

I have created a simple one-to-many hierarchy using the code first approach. All entities in the hierarchy have an Id, which is a Guid, and timestamps for CreatedOn and LastUpdate. These are contained ...
Pile's user avatar
  • 27
0 votes
1 answer
244 views

Unable to create an object of type 'ApplicationDbContext' error

I'm trying to create the database tables using entity core frame work using dotnet ef migrations add init --verbose and dotnet ef database update but when I'm trying to update the table I'm getting ...
Nismath_'s user avatar
0 votes
1 answer
409 views

Is there any way to cancel executing query and close database in C#?

I am making asp.net app which makes database query measurement. There are two buttons on my webpage start and stop. Start button function connects to PostgreSQL database, then execute 100 queries and ...
MART's user avatar
  • 5
1 vote
0 answers
451 views

Descrypt pgp_sym_decrypt (PostgreSql) text in c#

I have an application that uses C# to API and Postgrel for database. I need encrypted columns in my tables and I used the PGP_SYM_ENCRYPTfunction with the "KEY" key. Now I need to decrypt ...
Leonardo Artuso's user avatar
0 votes
0 answers
205 views

PostgreSQL migration parameter "locale" must be specified

I've been trying to set up migration in .NET, I have auto-generated migrate files, but there are some problems with it. When I try to execute this piece code: modelBuilder .HasAnnotation("...
Scott's user avatar
  • 13
1 vote
1 answer
59 views

Access closest/first value recursively in self reference Model (Tree) utilizing EF Core

I have a simple File System-like hierachy which has both Files and Folders, I'm having issues with retrieving information which is nested in their children or in their parent, or parent's parent, etc.....
gistix's user avatar
  • 53
0 votes
1 answer
187 views

Is it possible to add multiple items to a dictionary?

how can I add the sum of every column in a Dictionary? I would like to get this as result: { "collateral_amount": "600000", //The total sum of the collateral_amount column "...
test_'s user avatar
  • 33

15 30 50 per page
1
2 3 4 5
8