Mvvm Pattern erweitert

This commit is contained in:
Husky
2020-02-21 08:50:00 +01:00
parent 183646b4da
commit 5798fc6108
7 changed files with 51 additions and 52 deletions

View File

@@ -1,7 +1,10 @@
using KanSan.Base.Models;
using KanSan.Base;
using KanSan.Base.Interfaces;
using KanSan.Base.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
@@ -10,7 +13,7 @@ namespace KanSan.ViewModel
class BaustelleViewModel : PropertyChangedClass,INotifyPropertyChanged
{
private Baustelle _baustelle;
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
private string ort;
private string strasse;
@@ -57,9 +60,9 @@ namespace KanSan.ViewModel
public BaustelleViewModel(Baustelle baustelle)
public BaustelleViewModel()
{
_baustelle = baustelle;
_baustelle = unitOfWork.BaustellenRepository.Get().First();
ort = _baustelle.Ort;
strasse = _baustelle.Strasse;
projektnummer = _baustelle.Projektnummer;