Пример #1
0
    public static void Main()
    {
        var dbGenerator = new DbGenerator();
        var db          = new Database();

        var orderDbEntities = from d in dbGenerator.GetSequence(1000)
                              select d;

        db.AddRange(orderDbEntities);
        var items = db.FindBy("Jack", "Johnson");

        var ages = db.FindBy(30);

        var orderDbEntities1 = from d in dbGenerator.GetSequence()
                               select d;

        db.AddRange(orderDbEntities1);
        var items1 = db.FindBy("Charlie", "Smith");

        Console.WriteLine($"items: {items.Count}\titems1: {items1.Count}");

        var ages1 = db.FindBy(30);

        Console.WriteLine($"ages:  {ages.Count}\tages1:  {ages1.Count}");
    }
Пример #2
0
    public static void Main()
    {
        var dbGenerator = new DbGenerator();

        foreach (var item in dbGenerator.GetSequence(100))
        {
            Console.WriteLine(item);
        }
    }
Пример #3
0
    public static void Main()
    {
        var dbGenerator = new DbGenerator();
        var db          = new Database();

        db.AddRange(dbGenerator.GetSequence(10000));

        var items = db.FindBy("Jack", "Jones");

        Console.WriteLine(items.Count);

        var items2 = db.FindBy(30);

        Console.WriteLine(items2.Count);
    }