30 lines
685 B
C#
30 lines
685 B
C#
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);
|
|
}
|
|
}
|
|
}
|