//// //// GET: /Job/ public ActionResult Index() { var model = new JobViewModel(); var filters = context.Filters.OrderBy(f=>f.Order).ToList(); var categories = filters.Select(f => f.Category).Distinct(); foreach (var category in categories) { var filterVM = new FilterViewModel(); filterVM.Category = category; foreach (var filter in filters.Where(f=>f.Category== category)) { filterVM.Itens.Add(new FilterItem(filter.FilterId,filter.Name,filter.Quantity)); } model.Filters.Add(filterVM); } return View(model); }
// // GET: /Job/ public ActionResult Index() { var model = new JobViewModel(); model.Industries = context.Industries.OrderBy(i => i.Name).ToList(); return View(model); }