Using C# here
I have the following set where I want to update createdOn date and save to my db.
foreach (var person in myData)
{
person.CreatedBy = "abc";
person.CreatedOn = DateTime.UtcNow.ToString("o");
}
myRepo.Save(myData);
The issue is if I have 5 rows of data all the 5 rows get the same createdOn
For example, all the above get the same
CreatedOn as "2019-01-14T14:48:39.4814925Z"
What am I missing here, I thought everytime I loop and add createdOn it gets the next tick.