Giter Club home page Giter Club logo

Comments (7)

ErikEJ avatar ErikEJ commented on July 17, 2024

what happens if you do not use a constant?

from ef6.

osjoberg avatar osjoberg commented on July 17, 2024

It will work as EF will parameterize the SQL query. If nothing else, it is a work-around that can be used.

from ef6.

ErikEJ avatar ErikEJ commented on July 17, 2024

@osjoberg Cool, do not expect any bug fixes to EF6!

from ef6.

osjoberg avatar osjoberg commented on July 17, 2024

I see that this has been reported before so I guess it will not be fixed.

If anyone have any insight onto why the behaviour differs between .NET Framework 4.8 and .NET8 I would be interested to know.

Are there any other issues that can arise from having Thread.CurrentThread.CurrentCulture set?

from ef6.

ajcvickers avatar ajcvickers commented on July 17, 2024

This issue has been closed because EF6 is no longer being actively developed. We are instead focusing on stability of the codebase, which means we will only make changes to address security issues. See the repo README for more information.

from ef6.

CZEMacLeod avatar CZEMacLeod commented on July 17, 2024

@osjoberg My understanding is that CurrentCulture will affect the SQL generated in both net48 and net8, and it should be set to match the locale of your SQL server.
This can also affect your persistence data when serializing/deserializing.
You can use CurrentCultureUI for formatting strings etc. for your end user to differentiate between the two.

from ef6.

osjoberg avatar osjoberg commented on July 17, 2024

@CZEMacLeod Im pretty sure this is an error only in EF6/.NET7 as this error was found when porting a large system from .NET Framework 4.8 to .NET7. I have created two different console applications with the repro above one for .NET Framework 4.8 and one for .NET7. where the .NET Framework console application works, the .NET7 version throws an exception while trying to execute the invalid SQL.

I belive it is correct of my system to set CurrentCulture to present curerncies, dates etc. in a localized fashion. In this legacy system it has had no other side effect until now.

from ef6.

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.