zzz projects Dapper Tutorial
Getting Started Documentation 3rd Party Libraries Knowledge Base Online Examples
  • Getting Started
  • Documentation
  • 3rd Party Libraries
  • Knowledge Base
  • Online Examples
  •   Download  

Dapper Tutorial - Knowledge Base (KB)

34 results for: in tag: tsql

How to periodically flush dapper.net cache when used with SQL Server

Can someone please explain what this means (from the Dapper.net website)...Limitations and caveats...Dapper caches information about every query it runs, this allow it to materialize objects quickly and process parameters quickly. The current implementati...
c# dapper orm sql-server-2005 tsql
asked by Gullu

Dapper.NET documentation?

Where can I find the documentation on Dapper.net? There seem to be little if none! ...Thanks
c#-4.0 dapper tsql
asked by Bill

alternatives for Sqlinq to create sql queries from linq

Sqlinq... is an opensource project to create sql queries from linq. I'm using it with ...Dapper..., but unfortunately it doesn't support JOINs. ...Is there are any other libraries that do the same thing and supports JOIN too?...If not, what could be a so...
.net dapper linq sqlinq tsql
asked by mohsen dorparasti

Procedurally create a dynamic object for Dapper

I've seen many posts about creating ...ExpandoObject... objects and such, but it does not work in my case. I need to create an object like...var someObj = new { term1 = "someValue", term2 = "other", ... }; ...Basically, we are using ...Dapper....
ado.net c# dapper sql-server tsql
asked by Yanick Rochon

Using Dapper-dot-net, how do I map SQL uniqueidentifier column to a .Net type?

I have an existing database that uses the SQL "uniqueidentifier" type, which looks like a different GUID format than a .Net GUID....Question:... Using Dapper, how do I map SQL uniqueidentifier column to .Net?...Issue:... Using Dapper-dot-net, when I map t...
.net dapper tsql
asked by Dan Sorensen

Using Dapper-dot-net, how do I map SQL Time column to a .Net type?

I have an existing database that uses the SQL ...time(7)... type, which does not map directly to a .Net type. ...Question:... Using Dapper, how do I map a SQL ...time... column to a .Net type?...Issue:... When I attempt to implicitly map a SQL ...time(7)....
.net dapper tsql
asked by Dan Sorensen

How do I escape a '@' in a Dapper query?

I've got a query that should contain a literal at sign (...@...). How do I express this with a Dapper query?...var num = cnx.Query<int>("declare @foo int = 2; select @foo").Single(); ...I've tried using literals as a workaround:...var num = cnx.Query<int>...
dapper sql-server tsql
asked by Cameron

Dapper QueryMultiple Stored Procedures w/o mapping to Objects

With dapper, I can do batch execute for Stored Procedures, something similar to:...connection.Execute(@" exec sp1 @i = @one, @y = @two exec sp2 @i = @three", new { one = 1, two = 2, three = 3 }); ...However, the only means of retrieving data that I...
dapper dapper-extensions tsql
asked by Bill

Is there a more efficient way to update the sort order of an entire table?

I'm using client side drag and drop sort ordering for a table of data. The sort order is persisted in the database as a simple integer value. The schema looks like the following:...Id | Title | SortOrder 1 | A | 0 2 | B | 1 3 | C | 2 ...Dat...
asp.net-mvc c# dapper sql-server tsql
asked by Polynomial

Combinations of Where Criteria - Still parameterized query - Dapper

I have a Dapper query as follows...Public void GetAllCusomers(string CustmoerId, StringFirstName, String LastName, String Gender) { TblCustomer tblCustomer = new TblCustomer(); using (var sqlConnection = new SqlConnection(“Database...
c#-4.0 dapper tsql
asked by Ganesha K

named parameters in sp_executesql

is there any way that you can call sp_executesql with parameters that don't depend in the order they are defined in the store? the same query with exec works well, and if you have the same order it also works well, but it's a pain having to match the para...
dapper sp-executesql sql-server tsql
asked by Jokin

Using Sql, how can I hydrate child objects from within a single Query?

I'm using Dapper, but I think this applies to general SQL: ...I have the following: ... var dapperQuery = "select * from ( select * from [User] where " + "AccountDisabled <> 1 and " + "Ra...
c# dapper entity-framework sql tsql
asked by SB2055

Advanced cascade delete

I have a very simple database whose schema is defined as follows:...CREATE TABLE dbo.Tags ( TagName NVARCHAR(100) PRIMARY KEY ); CREATE TABLE dbo.Posts ( PostSlug NVARCHAR(100) PRIMARY KEY, Title NVARCHAR(100) NOT NULL ); CREATE TABLE dbo.Po...
c# dapper sql sql-server tsql
asked by Caster Troy

Understanding Dappers splitOn property

I've only just started using Dapper for a project I'm working on. I've got it up and running and made a few, simple queries, but when it comes to joining tables and using the ...splitOn... property, I'm a bit confused....Say I have the following query:..
c# dapper tsql
asked by Bo Mortensen

Generate an Id (GUID) from a Merge Statement

I have a data repository layer which accesses an SQL table on our database called ...Form.......I am trying to write a ...Merge... statement which inserts a new Id which is a GUID and updates the record if there is already an Id. However, my issue is that...
dapper merge-statement sql sql-server tsql
asked by Yuvi

Dapper return single value

I want to perform this simple test to see whether a table exists. I thought it would be easy just to return an int value depending on whether the table exists....Below is what I have tried and doesn't work:...result = connection.ExecuteScalar<int>(@" IF (...
c# dapper tsql
asked by Callum Linington

When calling a T-SQL stored procedure with Dapper do I need to use '@'?

I am want to call a stored procedure with Dapper and all the code I've seen so far does this by specifying the stored procedure parameters with the @ character. This means that I cannot simply define a model class and pass it into Dapper's Query or Execut...
c# dapper stored-procedures tsql
asked by Matt W

How to retrieve stored procedure return value with Dapper

I have a stored procedure of this form:...CREATE PROCEDURE AddProduct (@ProductID varchar(10), @Name nvarchar(150) ) AS SET NOCOUNT ON; IF EXISTS (SELECT TOP 1 ProductID FROM Products WHERE ProductID = @ProductID) ...
dapper sql-server tsql
asked by Matt W

Which transaction is better with Dapper: BEGIN TRAN or TransactionScope?

I've just started using Dapper and I was wondering which ...pattern... for transactions would be better....When I write SQL I prefer to use the transaction already in the script with:...BEGIN TRAN -- insert, update etc. COMMIT ...because it's easier to ...
c# dapper transactions tsql
asked by t3chb0t

.NET / .NET Core and SQL Server connection mismatch issue

I am developing C# application which is executing ~30 sql queries every second... I have multiple threads which do that. My problem is that when I try to query the sql server with ...SELECT ....... it returns different results....Example: If run both ...S...
c# dapper sql-server tsql
asked by Viktor Kynchev

Page 1 of 2
  • 1
  • 2
  • »

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...