public void AddRange()
        {
            var events = new RecordedRepositoryEvents();
            var repository = new EntityFrameworkRepository(new FamilyDbContext(), events);
            var count = repository.GetEntities<Animal>().Count();

            var newAnimals = new Animal[]
            {
                new Rabitt{Name = "rabitty"},
                new Cat{Name = "catty"}
            };

            repository.AddRange(newAnimals);
            repository.Save();

            events.AddedEvents.Count.ShouldEqual(2);
            events.SavedEvents.Count.ShouldEqual(1);

            var repository2 = new EntityFrameworkRepository(new FamilyDbContext());
            var count2 = repository2.GetEntities<Animal>().Count();
            count2.ShouldEqual(count + 2);
        }
 public void CheckStoredProc()
 {
     var repository = new EntityFrameworkRepository(new FamilyDbContext());
     var x = repository.ExecuteStoredProcudure("GetCounter");
     x.ShouldEqual(-1);
 }
 public void ExecuteSqlQuery()
 {
     var repository = new EntityFrameworkRepository(new FamilyDbContext());
     var parents = repository.ExecuteSqlQuery<Parent>("select * from dbo.people").Count();
     parents.ShouldEqual(11);
 }