14 lines
421 B
C#
14 lines
421 B
C#
using LootBoxSimulator.Models.DAO;
|
|
|
|
RemoteDatabaseContext db = new RemoteDatabaseContext();
|
|
String path = Console.ReadLine();
|
|
StreamReader file = new StreamReader(path);
|
|
string line;
|
|
while ((line = file.ReadLine()) != null)
|
|
{
|
|
var row = line.Split(";");
|
|
CategoryDao categoryDao = new CategoryDao { Name = row[0]};
|
|
db.Categories.Add(categoryDao);
|
|
db.SaveChanges();
|
|
}
|
|
Console.WriteLine(file.ReadToEnd()); |