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,
about Navicat for mysql Of 2003 error mybatis-config.xml Set default value configuration 415 Status code to background error el-select At the same time label and value value element ui Drop down box search function mysql Recursively finds all child nodes of the parent class PostgreSQL: Nine . Indexes Thread.getContextClassLoader And Thread.getClassLoader() difference ( Essence )2020 year 6 month 26 day C# Class library File read and write operation help class ToastUtils Use of