public ActionResult GetAllTypes() { var types = _typeRepository.GetTypes() .Select(t => new TypesViewModel { TypeID = t.TypeID, TypeName = t.TypeName }).ToList(); return(View("GetAllTypes", types)); }
public ActionResult Create() { var model = new WineViewModel(); model.TypesList = _typesRepository.GetTypes(); model.SubTypesList = _subTypeRepository.GetAll(); model.BottleSizeList = _bottleSizeRepository.GetAll(); model.RegionList = _regionRepository.GetAll(); model.CountryList = db.Countries.ToList(); return(View(model)); }
public IEnumerable <Types> GetTypes() { return(_repository.GetTypes()); }