Initial commit

This commit is contained in:
2023-08-01 14:04:38 +02:00
commit d64e49ce19
8 changed files with 225 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CardMarketServer
{
internal class UsedRepository : IUsedRepository
{
const string FILENAME = "usedList.csv";
public List<string> Query => File
.ReadLines(FILENAME)
.Select(l => l.Split(','))
.Select(p => new string(p[0]))
.ToList();
void insert(string key)
{
key += Environment.NewLine;
File.AppendAllText(FILENAME,key);
}
public void Insert(string bestellungid)
{
insert(bestellungid);
}
}
}