Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository的DeleteBatch方法都没transaction? #2

Closed
zengfanlin opened this issue Sep 29, 2018 · 1 comment
Closed

Repository的DeleteBatch方法都没transaction? #2

zengfanlin opened this issue Sep 29, 2018 · 1 comment

Comments

@zengfanlin
Copy link

` public int DeleteBatch(IDbConnection conn, IEnumerable ids, IDbTransaction transaction = null) where T : class
{
var tblName = GetTableName();
var idsin = string.Join(",", ids.ToArray());
var sql = string.Format("DELETE FROM {0} WHERE ID in (@ids)", tblName);
var result = SqlMapper.Execute(conn, sql, new { ids = idsin },transaction);

        return result;
    }`
@besley
Copy link
Owner

besley commented Jan 8, 2019

@zengfanlin ,Thanks , we have fixed this issue from yours code. :)

@besley besley closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants