public MainView() { InitializeComponent(); Consumo consumo = new Consumo(); DataContext = new ConsumoViewModel(consumo); }
public MainWindow() { InitializeComponent(); //DBHelper.EstablishConnection(); Main.Content = new MainView(); Consumo consumo = new Consumo(); DataContext = new ConsumoViewModel(consumo); }
public ConsumoViewModel(Consumo consumo) { Consumo = new List <Consumo>(); Consumo.Add(consumo); }