private void PopulateImovelDetalheBaseAssigned(ImovelDetalheTipoViewModel imovelDetalheTipoViewModel) { var allImovelDetalheBase = _imovelDetalheBaseAppService.ObterTodos(); var imovelDetalhebase = new HashSet <Guid>(imovelDetalheTipoViewModel.ImovelDetalheBases.Select(c => c.Id)); var viewModel = new List <ImovelDetalheBaseAssignedViewModel>(); foreach (var Base in allImovelDetalheBase) { viewModel.Add(new ImovelDetalheBaseAssignedViewModel { Id = Base.Id, Descricao = Base.Descricao, TipoDados = Base.TipoDados, Selecionado = imovelDetalhebase.Contains(Base.Id) }); } ViewBag.ImovelDetalheBaseLista = viewModel; }
// GET: ImovelDetalheBase public ActionResult Index() { var objRet = _imovelDetalheBaseAppService.ObterTodos(); return(View(objRet)); }