public ContaLuzViewModel(IContaLuzRepository contaLuzRepository) { this.listaContasLuz = contaLuzRepository.Get(); this.menorConsumo = contaLuzRepository.GetMenorConsumo(); this.maiorConsumo = contaLuzRepository.GetMaiorConsumo(); }
public IActionResult Index() { ViewBag.menorConsumo = contaLuzRepository.GetMenorConsumo(); ViewBag.maiorConsumo = contaLuzRepository.GetMaiorConsumo(); return(View(contaLuzRepository.GetAll())); }