What is wrong with using DateTime.Now. as main part of Unique ID?
问题 I used to use RNGCryptoServiceProvider to generate string-based Order ID's, but, there were 4 instances where ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@$%^*()_- would generate an already-existing Order ID. And it got me thinking... Why can't we just use something like: <html> ... <p>@GenerateOrderId()</p> ... </html> and: public string GenerateOrderId() { return "OID" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second +