public async Task <PartialViewResult> Exclusao(string id) { var userBus = new UsuarioBUS(new UsuarioREP()); var interesse = await userBus.ObterInteresse(id); return(PartialView("_DeletarInteresse", new ExclusaoViewModel(interesse))); }
public async Task <PartialViewResult> Detalhes(string id = null) { var model = default(DetalhesViewModel); if (!string.IsNullOrWhiteSpace(id)) { var userBus = new UsuarioBUS(new UsuarioREP()); var racaBus = new RacaBUS(); var interesse = await userBus.ObterInteresse(id); var racas = await racaBus.BuscarPorEspecie(interesse.Especie); model = new DetalhesViewModel(interesse, racas); } else { model = new DetalhesViewModel(); } return(PartialView("_Interesse", model)); }