The code is working perfectly on my local computer. I built the solution, I moved it to virtual machine, and there it is triggering me the error unhandled system data client exception the conversion of a varchar data type to a datetime type resulted in a out-of-range?
It is a Windows virtual machine. I thinks the error is triggered by that DateTime.Now
but I do not realise why, because on local works.
Status status = new Status()
{
Id= 20,
CreatedAt = DateTime.Now,
Operation = "getpayload",
Payload = JsonConvert.SerializeObject(payload)
};
Query.InsertStatus(status);