Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
33 views

I am fetching ProductTransfer table together with related products. Although the total records = 1200, am only getting three records returned by my api. Here is my models public class ...
Amos n's user avatar
  • 37
0 votes
1 answer
58 views

I have C# code that executes a Dapper Query, creates a temporary table, and uses a parameter to pass a value. In a subsequent query temp table is not available and will throw an error Invalid object ...
Akshay Chile's user avatar
Best practices
1 vote
3 replies
119 views

When we are using Dapper, we should use raw SQL queries within our code, and if the query is complex with multiple joins and windowed query, it is very difficult to maintain such code. Putting all ...
Navid_pdp11's user avatar
  • 4,128
2 votes
1 answer
106 views

We are trying to use Dapper to get a list of records from a SQL database with the following snippet of code: var result = await conn.QueryAsync<KeyValuePair<string,string>>("Select ...
user2981411's user avatar
-1 votes
1 answer
77 views

I have GetClientDocumentRequestResponse response dto. In this I have GetDocumentRequestClientResponse DTO which property name is client and GetDocumentRequestClientResponse DTO which property name is ...
Zeeshanwebdev's user avatar
0 votes
0 answers
64 views

I'm trying to call an Oracle stored procedure from C# that takes SYS.ODCIVARCHAR2LIST (a table of VARCHAR2) as input parameters. The procedure works correctly in SQL Developer, but from C# (using both ...
Ash K's user avatar
  • 4,074
-1 votes
1 answer
69 views

Currently I am using Dapper to bring back a dynamic object using the queryasync call. The problem is because everything is database driven we have to pass in the property name as a variable. Is there ...
James Andrew Smith's user avatar
1 vote
1 answer
148 views

I have an Azure Function built using .NET 8.0, which reads data from an Excel sheet and deletes all rows in Azure SQL Server, then adds around 67,000 new rows. I was doing this insert one by one with ...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
162 views

I have an Azure Durable Function that's scheduled to run every day at 18:00:00 UTC to generate a premium leads report. The function is triggered, but sometimes it doesn't complete or seems to silently ...
Shashimk's user avatar
0 votes
1 answer
66 views

My task is to log the raw SQL that dapper is going to be querying the DB with. So what I have done is made use of the decorator pattern and created my own class that implements IDbConnection More info ...
Shad's user avatar
  • 1,237
0 votes
2 answers
155 views

I have a custom class LoggingDbConnection that implements IDbConnection. This LoggingDbConnection class has its own public instance method, for example, QueryAsync<T>(...), which includes custom ...
Shad's user avatar
  • 1,237
1 vote
2 answers
92 views

I am fetching nested 1-to-many entities dynamically. Dapper is not mapping 1-to-many nested entities correctly. Within map function, objs has 2 items. objs[0] is the parent. Parent entity is good with ...
saibin's user avatar
  • 45
0 votes
1 answer
164 views

Question: How can I dynamically generate SQL INSERT and UPDATE queries in a generic repository using Dapper? Currently, I'm hardcoding the property names in the SQL queries, but I want to make this ...
Abhi Kumar Prince's user avatar
1 vote
0 answers
83 views

I have completely working code, which returns the desired result. var query = @$"SELECT boats.*, gallery.*, textblock.*, engine.*, generator.*, media.* FROM {...
Rajiv Ranjan's user avatar
2 votes
0 answers
229 views

I have a bunch of enums in my Postgres database, and for now I always parsed the enums manually from string to the effective value inside my .NET code (first map to string and then convert). While ...
kevingoos's user avatar
  • 4,523
0 votes
1 answer
297 views

I'm using Dapper in my project and I want to pass table name as a dynamic parameter in the query. This is my code: var tableName = GetTableNameDynamically<TEntity>(); using (var builder = new ...
Sumisha Sankar's user avatar
0 votes
1 answer
100 views

I'm working with Npgsql and and Dapper I have some tables in PostgreSql with a composite data type: create type datetimeoffset as ( "DateTimeUtc" timestamp without time zone, "...
Yván Ecarri's user avatar
  • 1,760
0 votes
1 answer
227 views

We have a class below that finds records in the list of tables provided in the parameters, and then deletes them within a transaction. public async Task<IEnumerable<DataTableRecordsResponse>&...
Mahyar Mottaghi Zadeh's user avatar
2 votes
0 answers
55 views

I am working on an ASP.NET Core 6 Web API that uses Dapper and performs long-running processes dependent on balance checks to decide whether they can proceed or not. Previously, we identified an issue ...
dotnet-developer's user avatar
-1 votes
1 answer
493 views

I've recently switched to using Aspire and I'm noticing some strange behaviors. I'm getting the following error when trying to access the database: System.InvalidOperationException: ...
3xGuy's user avatar
  • 2,509
2 votes
1 answer
91 views

I am using Dapper with SQLite. I have a table that is defined like so: CREATE TABLE Example ( id INTEGER NOT NULL, "some-field" TEXT ); I wrote a console application in ...
Ahmad's user avatar
  • 12.8k
0 votes
1 answer
132 views

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;...
Kiko's user avatar
  • 357
0 votes
2 answers
178 views

I am trying to map objects in a one to many relationship using Dapper. Assume a database with a Departments and a People table. People table has a DepartmentId column to create the relationship ...
George's user avatar
  • 57
-1 votes
2 answers
155 views

I'm using PostgreSQL with a .NET project, and I'm facing an issue executing a stored procedure through Dapper when using dynamic parameters to pass a DATE parameter. The stored procedure is defined as ...
Hemanth Kumar Chilamkurthi's user avatar
-2 votes
2 answers
203 views

SQLite query is SELECT * FROM tblProducts WHERE Id = 1 How to get List<string> of all values or Dictionary with property and value, with Dapper;
itsalikis's user avatar
1 vote
1 answer
166 views

I am trying to create a create method which will insert rows into my database. Table This is my database table. As you can see it has an accountId column CREATE TABLE [dbo].[Transactions]( [Id] [...
Linda Lawton - DaImTo's user avatar
0 votes
1 answer
231 views

I have a legacy code that is using dapper's QueryAsync() on DbContext's dbconnection: var connection = _context.GetConnection(); await connection.QueryAsync<Guid>(query, parameters); How do I ...
Liero's user avatar
  • 27.8k
0 votes
1 answer
212 views

I am getting this exception from Dapper.SqlMapper.GridReader when calling var resultSet = await SqlConnection.QueryMultipleAsync(query, parameters, commandType: CommandType.StoredProcedure); var ...
noontz's user avatar
  • 2,087
1 vote
1 answer
190 views

I am trying to create a generic method to get multiple data sets using Dapper. I will specify the list of expected data types and the method will give me the list of objects of the specific data type. ...
SYED NAWAZ PRINCE's user avatar
0 votes
1 answer
82 views

I have about 20 classes that are derived from ModelBase (which contains common things like CreationDate, Id etc). Using Dapper, it is easy to save and delete these derived classes (all the work is ...
mdicoope's user avatar
0 votes
1 answer
103 views

I have a series of classes that look like this: public class SignUpList { public int? SignUpListId { get; set; } public IEnumerable<SignUpItem> Items { get; set; } } public class ...
phroureo's user avatar
  • 379
1 vote
1 answer
806 views

To simplify the case, let's say I have the following table definitions in Oracle: create table customer ( id number(10), name nvarchar2(1024), primary key (id) ); create table ...
kzfid's user avatar
  • 836
0 votes
1 answer
139 views

public async Task<int> BulkInsertAsync<T>(string tableName, IEnumerable<T> data, int batchSize = 1000) { int totalRowsAffected = 0; var batches = data.Batch(batchSize); ...
Kusum's user avatar
  • 9
2 votes
0 answers
92 views

I am working on a Dapper query that fetches data for GraphQL query from multiple related tables like ImportJob, ImportJobChargeDetail, and ImportJobContainerDetail. The data that needs to be retrieved ...
Hardik Dhuri's user avatar
2 votes
0 answers
204 views

In .NET 8 with Npgsql and Dapper, our query is incredibly slow compared to executing it directly through another database manager. In our code, we execute queries as such: var query = "select ...
Janman's user avatar
  • 1,050
0 votes
1 answer
141 views

My method in C# looks like this: public bool Execute(IDynamicDatabaseConnection dbConn, List<DynamicGrid> loadObjects, out List<DynamicGridValue> result) { result = new List<...
tRuEsAtM's user avatar
  • 3,751
0 votes
0 answers
133 views

I have the following issue in an ASP.NET Core app. With Dapper I connect to a SQL Server database and I randomly have this issue: MoveNext : SqlException Message : Connection Timeout Expired. The ...
Aniss El Amrani's user avatar
0 votes
1 answer
247 views

I am working on an ASP.NET Core 6 project. I am using Dapper for my data access. When I used the data access on a long-running stored procedure, I got a timeout error. This stored procedure usually ...
Massey's user avatar
  • 1,131
0 votes
0 answers
75 views

I have three-layers architecture mini-program as my hometask of some paid private online courses. Recently I added ASP.NET Core as replacement for my console presentation-lavel. But I also have custom ...
Yaroslav Parkhomenko's user avatar
0 votes
1 answer
71 views

I want to send some data to PostgreSQL using a NOTIFY event and I have the following code to do so await using var conn = new NpgsqlConnection(connectionString); await conn.OpenAsync(); await conn....
JDChris100's user avatar
1 vote
1 answer
122 views

I am building a Blazor app using Dapper. I have a stored procedure with the following code, which executes perfectly when I test it in SSMS: ALTER PROCEDURE [dbo].[...
user10070084's user avatar
1 vote
1 answer
536 views

Dapper use IDbConnection. I know the difference between Scoped and Transient but I wonder why some people register IDbConnection in DI container in Program.cs as Scoped and others as Transient. Is ...
MrChudz's user avatar
  • 1,255
0 votes
0 answers
77 views

I want to update records on a view and get back the updated records to process them in my application, the code is working fine for almost cases, but for a specific senario when I have more than 22000 ...
Osama Azab's user avatar
1 vote
1 answer
231 views

I'm converting a Visual Basic API to .NET 8 using the same SQL Server query with the same parameters, and I noticed that some rows are not being displayed in the response object. The query uses UNION ...
Lucas Rafael's user avatar
0 votes
1 answer
69 views

I wrote an ASP.NET Core 8.0 Web API for an Angular frontend web site with node express and Postgresql 2 years ago we had a habit from that project with frontend programmers and my Web API. I give some ...
Burak OZLER's user avatar
0 votes
0 answers
106 views

I'm struggling w/some Dapper code. I have a singular, all encompassing list that I'm using in a couple different calls (handled by my stored procedure). This works well in most cases, but I'm ...
Dadhustle's user avatar
-2 votes
2 answers
784 views

Error: System.ArgumentException: Multi-map error: splitOn column 'Id' was not found - please ensure your splitOn parameter is set and in the correct order (Parameter 'splitOn'). It happens when i use ...
keks01's user avatar
  • 1
0 votes
0 answers
60 views

I'm trying to get selected cell value of multi DataGridView in TabControl to main datagridview in form1 with VB.NET Please Guide me for example when I selected row in the Criteria1 tabcontrol with ...
dlaksmi's user avatar
  • 213
0 votes
2 answers
128 views

I have two classes in C#: public class Student { public string Name {get; set;} public string Email {get; set;} public List<Course> Courses {get; set;} } public class Course { ...
Merlis's user avatar
  • 9
0 votes
1 answer
46 views

I have this stored procedure in the database: SELECT Cars.CarId AS carCarId, Cars.VinCode AS carVinCode, -- Cars.CustomerId AS carCustomerId, Cars.NumberPlate AS carNumberPlate, ...
Yaroslav Parkhomenko's user avatar

1
2 3 4 5
60