Search code examples
c#sql-serversimple.data

Is it possible to invoke a SQL function like GETDATE() when inserting or updating via Simple.Data?


For overall data consistency, I generally I prefer storing the current datetime for new/updated records with the current time on the database server, as it may not be in sync with the invoking server (and if using multiple web servers, they may also be out of sync with each other).

Is it possible to do this via Simple.Data, without having to resort to a stored procedure call?


Solution

  • Currently there is no Simple.Data reference to GETDATE. It's something I plan to address in v2; I will see if the code can be retro-fitted to v1.