Questions tagged as 'dapper'

1
answer

Error in query with Dapper

Well, I'm trying to run a query on com with Dapper and get the following error:    The model item entered in the dictionary is of type 'System.Collections.Generic.List'1 [FertilityRate.Models.Pais]', but this dictionary requires an ite...
asked by 17.01.2017 / 17:26
2
answers

Enumeration class in Repository Pattern

How can I read from my database a int attribute that in my system is an attribute of type Enumeration in Repository Pattern ? I made a class: public class Status : Enumeration { public static readonly Status Active =...
asked by 27.12.2016 / 18:35
1
answer

Is there any way to run an event whenever the SqlConnection.Update method of Dapper.Contrib.Extensions runs in an entity?

I'm using Dapper a little time and so I have little experience with it. I would like to know if there is any way to detect changes in a specific field. I need this because in a given table, every time a field is updated, I need to update anot...
asked by 21.03.2018 / 13:45
1
answer

How to run Procedures with Dapper

How can I run a store procedure with Dapper?     
asked by 10.11.2016 / 18:41
1
answer

Error in dynamic mapping: Missing type mapping or unsupported mapping

I have a data dictionary something like this: public class Colunas { public string ColunaOrigem {get; set;} public string ColunaDestino {get; set;} public DbType Tipo {get; set;} } public class Tabela { public string Nome {get; s...
asked by 21.08.2017 / 15:22
1
answer

Grid Fill dynamically with dapper framework return

I have a screen written in VB.NET WinForms, where the goal of it will be to execute SQL commands without the need to open an sql studio. For simpler commands like delete, update, alter table among others, it already works perfectly. Now, the...
asked by 03.02.2017 / 20:37
2
answers

Catch only the return value on a dapper

Does a query return this? var teste = _connection.Query(sQuery.ToString(), par).FirstOrDefault(); Well, inside the var test I have this: UF = "MA" But I just want the MA . How do I get the dapper to return only the value?     
asked by 03.04.2018 / 20:05
2
answers

Dapper requires writing SQL code, why?

I'm looking at the following link using Dapper: Getting Started With PostgreSQL Using Dapper In .NET Core and my question is, when I do it through Java I do not need to write the SQL code as this example here: //1. Insert using (var conn =...
asked by 17.08.2018 / 22:06
1
answer

How to check if all the data in my list exists in the database?

I need to get the files that are in a list and compare them with the files that are in a table in the database, and know if the amount of files in my list is the same amount as the table. using Dapper; public bool ValidarPessoas(List <in...
asked by 13.06.2018 / 19:58
1
answer

Selection with Dapper using IN clause

My idea is to generate a search on my bank using the in clause through Dapper . For example: select * from product where CasNo in(@filtro) Remembering that within this @filtro has a list of CasNo that is of type List<...
asked by 22.10.2018 / 17:53