DapperLib / DapperLib/Dapper.Contrib

Need SqlAnywhereAdapter or SybaseAdapter

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
293
Forks
109
PR merge metrics
No merged PRs in 30d

Description

Hello, i'm using actually Dapper for Sybase (SQL Anywhere) for QueryFirstOrDefault, Query, Execute and ExecuteScalar and it is pretty well supported actually.

I use it as follow with the parameter [ ?property? ] instead of [@property]":

string sql = "select * from Order where Order_ID = ?Order_ID?"
var order = conn.Query(sql, new { Order_ID= 3 });

as simple like that.

but Actually I cannot use the Dapper.Contrib functions => Insert, update, delete, etc.. because it is hardcoded with the SQLServer parameter @Order_ID by default.

I'm suggesting to add a SqlAnywhereAdapter to the SqlMapperExtension.cs

I want to tell you also that Access 2000 seems to works with single [ ? ] parameter as well when connected by OleDb (Insert into ... (?,?,?'?), new { value1, value2, value3, value4 };

Also, Access DB have difficulty with DateTime type and want it to be in string format before inserting.
[ DateTime.Today.ToString("yyyy-MM-dd") ]

Thank you for feedbacks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in SqlMapperExtension.cs and inspect how Dapper.Contrib currently hardcodes SQL Server parameters for Insert, update, and delete. Clarify whether the goal includes both a SqlAnywhere/Sybase adapter and Access date handling, then define completion around those operations working with the requested parameter syntax and add or run the relevant repository tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.