Example #1
0
        public void Should()
        {
            using (var work = _unitOfWork.Begin())
            {
                var camp = new Camp
                {
                    Name             = Some.Name,
                    DefaultSlotPrice = Some.Price
                };
                _repo.Save(camp);

                var instructor = Build.Instructor().WithFirstName("Chris").WithLastName("Rolsdorph");//.WithMoney(500);
                camp.Add(instructor);
                _repo.Save(instructor.Item);
                var student = Build.Student().WithFirstName("Jonas").WithLastName("Hansen").WithMoney(200);
                camp.Add(student);
                _repo.Save(student.Item);

                work.Complete();
            }
            _repo.SaveChanges();
        }
Example #2
0
 public DayBuilder ForCamp(Camp camp)
 {
     camp.Add(Item);
     return(MySelf);
 }