Skip to content

want a parameter name that distinguish case sensitive to be other names #6

Description

@OdaShinsuke

code

class DB {
    public Hoge Hoge { get; set; }
}
class Hoge {
    public long Id { get; set; }
}

var id = 1;
var h = new Hoge { Id = 1 };
var sql = Db<DB>.Sql(db => Where(db.Hoge.Id == id || db.Hoge.Id == h.Id));
Debug.WriteLine(sql.Build(typeof(SqlConnection)).Text);

output

WHERE Hoge.Id = @id OR Hoge.Id = @Id

SQL Server parameter name case sensitive/insensitive depends on collation.
https://technet.microsoft.com/ja-jp/library/ms188686(v=sql.105).aspx

expected

WHERE Hoge.Id = @id OR Hoge.Id = @id_1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions