using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace GreenTree.Strohrmann.ERP.Core.Extension
{
    public static class GuidExtension
    {
        /// <summary>
        /// Converts the GUID to a short version
        /// </summary>
        /// <param name="guid">The GUID object.</param>
        /// <returns>The first part until the first hyphen of the regular GUID.</returns>
        public static string ToShortString(this Guid guid)
        {
            return guid.ToString().Split('-')[0];
        }
    }
}
