Mvvm Pattern erweitert
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user