<commit_before>﻿using Example.Data;
using Example.Data.Entities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.EntityFrameworkCore;
using System.Linq;

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            Context db = new Context();
            Console.WriteLine(db.Database.CanConnect());

            NewContext db2 = new NewContext();

            Messurement current = new Messurement();

            Stopwatch watch = new Stopwatch();

            watch.Start();



            List<User> users2 = db.Users.Include("Contents.Entries").Include("Contents").Include("Contents").ToList();

            List<User> user3 = db2.Users.ToList();
            db2.Users.RemoveRange(user3.Take(2));
            db2.SaveChanges();


            db.Users.RemoveRange(db.Users.Skip(40));
            db.SaveChanges();

            List<User> users = db.Users.Include(x => x.Contents).ThenInclude(x => x.Entries).Include(x => x.Settings).ToList(); //db.Users.Include(x => x.Contents).Include(x => x.Settings).ToList();

            List<Content> contents = db.Contents.Include(x => x.User).ToList();

            watch.Stop();
            current.TimeRead = watch.Elapsed;
            current.EntryCount = users.Count + contents.Count;
            Console.WriteLine((users.Count + contents.Count) + " Werte in " + watch.ElapsedMilliseconds + " ms gelesen");

            watch.Restart();

            User us = new User()
            {
                Name = "<NAME>",
                Username = ""
            };

            db.Users.Add(us);

            User us3 = new User()
            {
                Name = "<NAME>",
                Username = ""
            };

            db2.Users.Add(us3);

            db2.SaveChanges();

            db.SaveChanges();

            db.Users.Remove(db.Users.FirstOrDefault());

            db.SaveChanges();

            Content c = new Content()
            {
                Text = "Test",
                UserId = us.Id
            };

            db.Contents.Add(c);

            db.ContentEntries.Add(new ContentEntry()
            {
                Text = "das ist in set",
                ContentId = c.Id
            });

            db.Users.Add(new User()
            {
                Username = "test123",
                Name = "Test Test"
            });

            db.Users.Add(new User()
            {
                Username = "test234",
                Name = "Test Test 2"
            });

            db.Users.Add(new User()
            {
                Username = "test567",
                Name = "Test Test 3"
            });

            db.SaveChanges();

            watch.Stop();
            current.TimeWrite = watch.Elapsed;
            Console.WriteLine("Werte in " + watch.ElapsedMilliseconds + " ms geschrieben");

            db.Messurements.Add(current);
            db.SaveChanges();

            db.Generics.Add(new GenericTest<int>()
            {
                Value = 1
            });

            db.Generics.Add(new GenericTest<int>()
            {
                Value = 2
            });


            db.SaveChanges();

            Console.WriteLine(db.Generics.Count());

            while (true)
            {
                string result = Console.ReadLine();

                if (result != "q")
                {
                    db.Users.Add(new User()
                    {
                        Username = "testuser",
                        Name = "Test User"
                    });

                    db.SaveChanges();

                    continue;
                }

                break;
            }

            Context db3 = new Context();
            Context db4 = new Context();

            List<User> users3 = db3.Users.ToList();

            db4.Users.Add(new User()
            {
                Name = "<NAME>",
                Username = "morrisj"
            });

            db4.SaveChanges();

            users3 = db3.Users.ToList();

            Console.WriteLine(db.Users.Count());

            db.Users.Add(new User()
            {
                Name = "Test",
                Username = "testname"
            });
            db.SaveChanges();

            Console.WriteLine(db.Users.Count());

            Console.ReadKey();
        }
    }
}
<commit_msg>added example for nullable deserialization<commit_after>﻿using Example.Data;
using Example.Data.Entities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.EntityFrameworkCore;
using System.Linq;

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            Context db = new Context();
            Console.WriteLine(db.Database.CanConnect());

            NewContext db2 = new NewContext();

            Messurement current = new Messurement();

            Stopwatch watch = new Stopwatch();

            watch.Start();



            List<User> users2 = db.Users.Include("Contents.Entries").Include("Contents").Include("Contents").ToList();

            List<User> user3 = db2.Users.ToList();
            db2.Users.RemoveRange(user3.Take(2));
            db2.SaveChanges();


            db.Users.RemoveRange(db.Users.Skip(40));
            db.SaveChanges();

            List<User> users = db.Users.Include(x => x.Contents).ThenInclude(x => x.Entries).Include(x => x.Settings).ToList(); //db.Users.Include(x => x.Contents).Include(x => x.Settings).ToList();

            List<Content> contents = db.Contents.Include(x => x.User).ToList();

            watch.Stop();
            current.TimeRead = watch.Elapsed;
            current.EntryCount = users.Count + contents.Count;
            Console.WriteLine((users.Count + contents.Count) + " Werte in " + watch.ElapsedMilliseconds + " ms gelesen");

            watch.Restart();

            User us = new User()
            {
                Name = "<NAME>",
                Username = "",
                Type = User.UserType.Manager,
                Test = 2
            };

            db.Users.Add(us);

            User us3 = new User()
            {
                Name = "<NAME>",
                Username = ""
            };

            db2.Users.Add(us3);

            db2.SaveChanges();

            db.SaveChanges();

            db.Users.Remove(db.Users.FirstOrDefault());

            db.SaveChanges();

            Content c = new Content()
            {
                Text = "Test",
                UserId = us.Id
            };

            db.Contents.Add(c);

            db.ContentEntries.Add(new ContentEntry()
            {
                Text = "das ist in set",
                ContentId = c.Id
            });

            db.Users.Add(new User()
            {
                Username = "test123",
                Name = "<NAME>"
            });

            db.Users.Add(new User()
            {
                Username = "test234",
                Name = "Test Test 2"
            });

            db.Users.Add(new User()
            {
                Username = "test567",
                Name = "Test Test 3"
            });

            db.SaveChanges();

            watch.Stop();
            current.TimeWrite = watch.Elapsed;
            Console.WriteLine("Werte in " + watch.ElapsedMilliseconds + " ms geschrieben");

            db.Messurements.Add(current);
            db.SaveChanges();

            db.Generics.Add(new GenericTest<int>()
            {
                Value = 1
            });

            db.Generics.Add(new GenericTest<int>()
            {
                Value = 2
            });


            db.SaveChanges();

            Console.WriteLine(db.Generics.Count());

            while (true)
            {
                string result = Console.ReadLine();

                if (result != "q")
                {
                    db.Users.Add(new User()
                    {
                        Username = "testuser",
                        Name = "Test User"
                    });

                    db.SaveChanges();

                    continue;
                }

                break;
            }

            Context db3 = new Context();
            Context db4 = new Context();

            List<User> users3 = db3.Users.ToList();

            db4.Users.Add(new User()
            {
                Name = "<NAME>",
                Username = "morrisj"
            });

            db4.SaveChanges();

            users3 = db3.Users.ToList();

            Console.WriteLine(db.Users.Count());

            db.Users.Add(new User()
            {
                Name = "Test",
                Username = "testname"
            });
            db.SaveChanges();

            Console.WriteLine(db.Users.Count());

            Console.ReadKey();
        }
    }
}

{'fraction_non_alphanumeric': 0.12266065388951522, 'fraction_numerical': 0.008004509582863585, 'mean_word_length': 1.1860522424839823, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3902603', 'n_tokens_mistral': 2392, 'n_tokens_neox': 2196, 'n_words': 421}