Exemplo n.º 1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="UnitOfWork" /> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public UnitOfWork(VacationContext context)
 {
     this.context        = context;
     this.Accommodations = new Repository <Accommodation>(context);
     this.Activities     = new Repository <Activity>(context);
     this.Destinations   = new Repository <Destination>(context);
     this.Trips          = new Repository <Trip>(context);
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Repository{T}" /> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public Repository(VacationContext context)
 {
     this.context = context;
 }