using System; namespace Core.Util { /// <summary> /// GUID Help class /// </summary>
public static class GuidHelper { /// <summary> /// Generate primary key /// </summary> ///
<returns></returns> public static string GenerateKey() {
//ToSequentialGuid() Is the extension method return Guid.NewGuid().ToSequentialGuid().ToUpper(); }
} }
ToSequentialGuid() Is the extension method
using System; namespace Core.Util { public static partial class Extention {
/// <summary> /// To be orderly GUID /// notes : Count Reg 50 character /// </summary> /// <param
name="guid"> new GUID</param> /// <returns></returns> public static string
ToSequentialGuid(this Guid guid) { var timeStr = (DateTime.Now.ToCstTime().Ticks
/ 10000).ToString("x8"); var newGuid = $"{timeStr.PadLeft(13, '0')}-{guid}";
return newGuid; } } }

Technology
©2019-2020 Toolsou All rights reserved,
use easyPOI Import Excel data Vue Transfer parameters and receiving of page Jump Digital rolling lottery program The difference between memory overflow and memory leak , Causes and Solutions vue monitor Treeselect Change of options Image format conversion TypeScript- Polymorphism JavaScript Medium Call and Applyk8s Entry to give up --k8s Key concepts How to build data security system ?