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