public ActionResult Details(Guid guid) { YoumotoDbContext context = new YoumotoDbContext(); var garage = GaragePersister.LoadSingle(context, guid); var viewModel = new GarageViewModels.Details(garage); return(View(viewModel)); }
public IEnumerable <GarageViewModels.Preview> LoadGarages(Int32 skip = 0, Int32 take = 5) { YoumotoDbContext context = this.context ?? new YoumotoDbContext(); return(GaragePersister .LoadRandomPaged(context, GarageTypes.Any, skip, take) .Select(runner => new GarageViewModels.Preview(runner))); }