Giter Club home page Giter Club logo

Comments (5)

rhubley avatar rhubley commented on May 29, 2024

If you changed it to compare to "ID" instead of "id" does it work for you? Apparently ToUpper works better for Turkey, don't know if it fails for other cultures though.

from dapper.contrib.

yusufozturk avatar yusufozturk commented on May 29, 2024

@rhubley

ToUpper can make it "İD", so it will fail again :)

I think the best way is adding culture to string.equal operation. For now, we wrote a custom convert method to change ıd to id, İD to ID etc.

from dapper.contrib.

canertosuner avatar canertosuner commented on May 29, 2024

@yusufozturk
Could you share your ext. method ? or what does it exactly do for it ?

from dapper.contrib.

rhubley avatar rhubley commented on May 29, 2024

Setting a culture is tricky, you would need your code and Database to share the same culture which might not always be the case.

from dapper.contrib.

Adondriel avatar Adondriel commented on May 29, 2024

We should probably address this by using whatever locale is used in the model object, by changing the hardcoded "id" to grabbing the variable name from the object itself. This would mean that if they define the model in turkish(is that the name of the language?) that should give us the correct variable to query against. (grabbed via the [Key] attribute, of course)

Edit: NVM, this is not needed. This is an internal thing. We are using the wrong method for comparing them, I think.
see reference: https://msdn.microsoft.com/en-us/library/system.stringcomparer.currentcultureignorecase(v=vs.110).aspx

from dapper.contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.