private static void TryAddToDatabase(DbFavorite historyTarget) { using (Database database = DatabaseConnections.CreateInstance()) { string userSid = WindowsUserIdentifiers.GetCurrentUserSid(); // store holds dates in UTC database.InsertHistory(historyTarget.Id, Moment.Now, userSid); } }