Renaming
start.bat added
This commit is contained in:
27
CardMarketBot/UsedRepository.cs
Normal file
27
CardMarketBot/UsedRepository.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using ConsoleApp3.Contracts;
|
||||
|
||||
namespace ConsoleApp3
|
||||
{
|
||||
internal class UsedRepository : IUsedRepository
|
||||
{
|
||||
public List<string> Query => File
|
||||
.ReadLines("usedList.csv")
|
||||
.Select(l => l.Split(','))
|
||||
.Select(p => new String(p[0]))
|
||||
.ToList();
|
||||
|
||||
public void insert(string key)
|
||||
{
|
||||
key += Environment.NewLine;
|
||||
File.AppendAllText("usedList.csv", key);
|
||||
}
|
||||
|
||||
public void Insert(List<Kunde> list)
|
||||
{
|
||||
foreach(var kunde in list)
|
||||
{
|
||||
insert(kunde.BestellungID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user