Erweitert

This commit is contained in:
Husky
2021-02-26 08:27:11 +01:00
parent b038a59ca7
commit 6761b17f4d
15 changed files with 114 additions and 94 deletions

View File

@@ -12,6 +12,11 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.3" />
</ItemGroup>
<!-- <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.3" />
</ItemGroup>
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<add key="signatureValidationMode" value="accept" />
</configuration>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Models;
using DataStoring.Contract;
namespace DataStoring.CSV
{
public class AuftraggeberRepository: IAuftraggeberRepository
{
public List<Auftraggeber> Query => File
.ReadAllLines("auftraggeber.csv")
.Select(l => l.Split(','))
.Select(p => new Auftraggeber
{
Id = int.Parse(p[0]),
Name = p[1],
Strasse = p[2],
Ort = p[3],
Tel = p[4],
})
.ToList();
}
}

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Models\Models.csproj" />
<ProjectReference Include="..\DataStoring.Contract\DataStoring.Contract.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Models\Models.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using Models;
namespace DataStoring.Contract
{
public interface IAuftraggeberRepository
{
List<Auftraggeber> Query {get;}
}
}

View File

@@ -15,7 +15,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Models", "Models\Models.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtokollWriter", "ProtokollWriter\ProtokollWriter.csproj", "{9762AAF6-BB07-4416-9522-3D2A05C4216A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFClient", "WPFClient\WPFClient.csproj", "{75CAC182-0861-4E01-88DF-52FF5CFAB3C2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStoring.Contract", "DataStoring.Contract\DataStoring.Contract.csproj", "{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStoring.CSV", "DataStoring.CSV\DataStoring.CSV.csproj", "{18E745A2-2D17-4C21-BD6F-521E681A9834}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -114,5 +116,29 @@ Global
{75CAC182-0861-4E01-88DF-52FF5CFAB3C2}.Release|x64.Build.0 = Release|Any CPU
{75CAC182-0861-4E01-88DF-52FF5CFAB3C2}.Release|x86.ActiveCfg = Release|Any CPU
{75CAC182-0861-4E01-88DF-52FF5CFAB3C2}.Release|x86.Build.0 = Release|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Debug|x64.ActiveCfg = Debug|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Debug|x64.Build.0 = Debug|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Debug|x86.ActiveCfg = Debug|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Debug|x86.Build.0 = Debug|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Release|Any CPU.Build.0 = Release|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Release|x64.ActiveCfg = Release|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Release|x64.Build.0 = Release|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Release|x86.ActiveCfg = Release|Any CPU
{BDC2AC0C-8CD5-4B4F-840F-24EE31E3B06C}.Release|x86.Build.0 = Release|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Debug|x64.ActiveCfg = Debug|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Debug|x64.Build.0 = Debug|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Debug|x86.ActiveCfg = Debug|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Debug|x86.Build.0 = Debug|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Release|Any CPU.Build.0 = Release|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Release|x64.ActiveCfg = Release|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Release|x64.Build.0 = Release|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Release|x86.ActiveCfg = Release|Any CPU
{18E745A2-2D17-4C21-BD6F-521E681A9834}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -4,10 +4,11 @@ using System.Collections.Generic;
namespace Models {
public class Auftraggeber {
public string Name ="";
public string Ort = "";
public string Strasse = "";
public string Tel = "";
public int Id {get;set;}
public string Name {get;set;}
public string Ort {get;set;}
public string Strasse {get;set;}
public string Tel {get;set;}
public IEnumerable<Bauvorhaben> Baustellen = new List<Bauvorhaben>();
}
}

View File

@@ -1,9 +0,0 @@
<Application x:Class="WPFClient.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPFClient"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

View File

@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace WPFClient
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

View File

@@ -1,10 +0,0 @@
using System.Windows;
[assembly:ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@@ -1,12 +0,0 @@
<Window x:Class="WPFClient.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFClient"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
</Grid>
</Window>

View File

@@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WPFClient
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

View File

@@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.3" />
</ItemGroup>
</Project>

9
nuget.config Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="signatureValidationMode" value="accept" />
</packageSources>
</configuration>