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

@@ -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();
}
}