Comments (4)
Hi there. Unfortunately, no there is not a simple way to change this behaviour. And, yes you may request this as a feature enhancement ðĪŠ I think that this should be relatively straight forward(-ish) change - I will look into it ð
from beef.
Awesome, thanks. Much appreciated ð
from beef.
OK. Took a little longer than expected, but I think I have got there.
The Beef.Entities.Cleaner
class has a DefaultDateTimeTransform
that can now be set (overridden); I have defaulted this to DateTimeUtc
(the previous version was DateTimeLocal
) - so this is a change in behaviour. The code-gen has been updated so that the default options for StringTrim
, StringTransform
and DateTimeTransform
will be UseDefault
. They can still be overridden where required; e.g. DateOnly
. Internally, anywhere that a DateTime.Now
was being performed, it is wrapped as Cleaner.Clean(DateTime.Now)
to ensure the right DateTimeKind
is applied.
Note that the ADO.NET framework always returns a DateTime
with DateTimeKind.Unspecified
- it's Kind
is set accordingly, but no adjustment to the time zone is made as it is assumed it was persisted as the defined DateTimeKind
(e.g. UTC or local). Both the SQL DATETIME
and DATETIME2
do not store offset, you would need to use DATETIMEOFFSET
if required.
I'll publish the updated NuGet packages in the next hour or two. Let me know how you get on. You might owe me a Jee's Burger for this one ð
from beef.
Thanks for that. Yeah that was more than I was expecting ð. I'll get this in as soon as possible and let you know how we go.
Yes Jee's Burgers on me, I do hope they are still around, it's been a couple months since I've been into the city!
from beef.
Related Issues (20)
- DataMapping IndexOutOfRangeException exception for incorrect filed names. HOT 1
- Cant add people from middle ages to Beef.Demo
- Sql Text/NText columns cant be used in the Cdc Code Generator as they arent mapped to a .NET type HOT 1
- In the Demo project, RegenerateAll.ps1 changes working directory HOT 1
- Feature idea - redirect from / to swagger
- Feature idea - docker-compose/tye file for running Mr.Hr sample with SQL database
- Feature Request - Asynchronous Call Integrity HOT 2
- Namespaces conflict has occured when creating "User" entity with Cosmos DB HOT 1
- Cosmos DB "PartitionKey has fewer components than defined the collection resource." error in Azure App Service HOT 1
- AgentTester RegisterBeforeRequest ineffective withhin test class.
- .ExpectChangeLogCreated( ) fails when API takes a little longer to return value. HOT 3
- membersToIgnore parameter of ExpectEvent<T>( ) doesn't work HOT 3
- OmitEntityBase breaks entities when used with a custom PathCommon HOT 1
- Merging reference data does not work when using multibyte-charractors HOT 1
- idea: Add conditional branching based on the existence of an ExtraProperty item and an item value to the template in Demo sample.
- Project naming could create confusion with existing "BeEF" public project HOT 1
- Test fails: 'The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached' HOT 3
- OpenAPI (Swagger) contains unnecessary models HOT 1
- PagingArgs parameter does not recognized by OpenAPI (Swagger) HOT 3
- Security Policy violation Outside Collaborators HOT 46
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
ð Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google âĪïļ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beef.