Inheritance: OpenAccessContext, ITelerikAcademyModelsUnitOfWork
 public void BulkDelete()
 {
     using (var context = new TelerikAcademyModels())
     {
         context.OpenAccessDemoEntities.DeleteAll();
     }
 }
        public void NormalDelete()
        {
            using (var context = new TelerikAcademyModels())
            {
                foreach (var item in context.OpenAccessDemoEntities)
                {
                    context.Delete(item);
                }

                context.SaveChanges();
            }
        }
        public MemoryStream SerializeToBinaryStream(string employeeFName)//memory stream 
        {
            BinaryFormatter formatter = new BinaryFormatter();

            MemoryStream stream = new MemoryStream();
            using (TelerikAcademyModels dbContext = new TelerikAcademyModels())
            {
                Employee customer = dbContext.Employees.Where(e => e.FirstName == employeeFName).First();

                var sentQueryToServer = customer.FirstName;

                formatter.Serialize(stream, customer);
            }

            return stream;
        }
        public void Insert100000EntitiesInDB()
        {
            using (var context = new TelerikAcademyModels())
            {
                ulong id = 1;
                int counter = 0;
                while (counter < 100000)
                {
                    id += 7;
                    var row = new OpenAccessDemoEntity()
                    {
                        Name = id + "Demo"
                    };

                    context.Add(row);

                    counter += 1;
                    context.SaveChanges();
                }
            }
        }