-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
28 lines (23 loc) · 973 Bytes
/
Copy pathProgram.cs
File metadata and controls
28 lines (23 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
namespace CustomerIdGenerator
{
internal class Program
{
static void Main(string[] args)
{
List<string> context = new List<string>() { "DX645789", "AC125489", "KL985632" }; //replace this list with a Database!
//Generate a CustomerId of 2 Letters and 6 numbers
//context replaces a list retrived from the Database
//to compare with already assigned CustomerIds in the Database
//to not assigned the same one twice
Generator gen = new Generator(context);
Console.WriteLine(gen.NewCuid());
Console.WriteLine(gen.NewCuid());
//Choose the length your CustomerId by adding first a number for length
Generator gen2 = new Generator(9,context);
Console.WriteLine(gen2.NewCuid());
Console.WriteLine(gen2.NewCuid());
}
}
}