add filereader
This commit is contained in:
parent
684a1ad692
commit
d667c02cfe
@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings" defaultProject="true" />
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +1,14 @@
|
||||
using LootBoxSimulator.Models.DAO;
|
||||
|
||||
RemoteDatabaseContext db = new RemoteDatabaseContext();
|
||||
|
||||
foreach (var result in db.Categories)
|
||||
String path = Console.ReadLine();
|
||||
StreamReader file = new StreamReader(path);
|
||||
string line;
|
||||
while ((line = file.ReadLine()) != null)
|
||||
{
|
||||
Console.WriteLine($"{result.Id} | {result.Name}");
|
||||
var row = line.Split(";");
|
||||
CategoryDao categoryDao = new CategoryDao { Name = row[0]};
|
||||
db.Categories.Add(categoryDao);
|
||||
db.SaveChanges();
|
||||
}
|
||||
Console.WriteLine(file.ReadToEnd());
|
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("LootBoxSimulator")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f05c4ca34c40f604537abb997bf99aa3ec9ee1e5")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+684a1ad6929b649ac97d03976112fc7cfccb5497")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("LootBoxSimulator")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("LootBoxSimulator")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,24 +1,47 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "eamoFob6erM=",
|
||||
"dgSpecHash": "QYfTKOl98mU=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/laptop/RiderProjects/LootBoxSimulator/LootBoxSimulator/LootBoxSimulator.csproj",
|
||||
"expectedPackageFiles": [
|
||||
"/home/laptop/.nuget/packages/humanizer.core/2.14.1/humanizer.core.2.14.1.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.bcl.asyncinterfaces/6.0.0/microsoft.bcl.asyncinterfaces.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.codeanalysis.analyzers/3.3.3/microsoft.codeanalysis.analyzers.3.3.3.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.codeanalysis.common/4.5.0/microsoft.codeanalysis.common.4.5.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.codeanalysis.csharp/4.5.0/microsoft.codeanalysis.csharp.4.5.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.codeanalysis.csharp.workspaces/4.5.0/microsoft.codeanalysis.csharp.workspaces.4.5.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.codeanalysis.workspaces.common/4.5.0/microsoft.codeanalysis.workspaces.common.4.5.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.entityframeworkcore/8.0.11/microsoft.entityframeworkcore.8.0.11.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.entityframeworkcore.abstractions/8.0.11/microsoft.entityframeworkcore.abstractions.8.0.11.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.entityframeworkcore.analyzers/8.0.11/microsoft.entityframeworkcore.analyzers.8.0.11.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.entityframeworkcore.design/8.0.11/microsoft.entityframeworkcore.design.8.0.11.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.entityframeworkcore.relational/8.0.11/microsoft.entityframeworkcore.relational.8.0.11.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.caching.abstractions/8.0.0/microsoft.extensions.caching.abstractions.8.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.caching.memory/8.0.1/microsoft.extensions.caching.memory.8.0.1.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.configuration.abstractions/8.0.0/microsoft.extensions.configuration.abstractions.8.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.dependencyinjection/8.0.1/microsoft.extensions.dependencyinjection.8.0.1.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.dependencyinjection.abstractions/8.0.2/microsoft.extensions.dependencyinjection.abstractions.8.0.2.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.dependencymodel/8.0.2/microsoft.extensions.dependencymodel.8.0.2.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.logging/8.0.1/microsoft.extensions.logging.8.0.1.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.logging.abstractions/8.0.2/microsoft.extensions.logging.abstractions.8.0.2.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.options/8.0.2/microsoft.extensions.options.8.0.2.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/microsoft.extensions.primitives/8.0.0/microsoft.extensions.primitives.8.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/mono.texttemplating/2.2.1/mono.texttemplating.2.2.1.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/npgsql/8.0.6/npgsql.8.0.6.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/npgsql.entityframeworkcore.postgresql/8.0.11/npgsql.entityframeworkcore.postgresql.8.0.11.nupkg.sha512"
|
||||
"/home/laptop/.nuget/packages/npgsql.entityframeworkcore.postgresql/8.0.11/npgsql.entityframeworkcore.postgresql.8.0.11.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.codedom/4.4.0/system.codedom.4.4.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.collections.immutable/6.0.0/system.collections.immutable.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.composition/6.0.0/system.composition.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.composition.attributedmodel/6.0.0/system.composition.attributedmodel.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.composition.convention/6.0.0/system.composition.convention.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.composition.hosting/6.0.0/system.composition.hosting.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.composition.runtime/6.0.0/system.composition.runtime.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.composition.typedparts/6.0.0/system.composition.typedparts.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.io.pipelines/6.0.3/system.io.pipelines.6.0.3.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.reflection.metadata/6.0.1/system.reflection.metadata.6.0.1.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.text.encoding.codepages/6.0.0/system.text.encoding.codepages.6.0.0.nupkg.sha512",
|
||||
"/home/laptop/.nuget/packages/system.threading.channels/6.0.0/system.threading.channels.6.0.0.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
@ -1 +1 @@
|
||||
"restore":{"projectUniqueName":"/home/laptop/RiderProjects/LootBoxSimulator/LootBoxSimulator/LootBoxSimulator.csproj","projectName":"LootBoxSimulator","projectPath":"/home/laptop/RiderProjects/LootBoxSimulator/LootBoxSimulator/LootBoxSimulator.csproj","outputPath":"/home/laptop/RiderProjects/LootBoxSimulator/LootBoxSimulator/obj/","projectStyle":"PackageReference","UsingMicrosoftNETSdk":false,"originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.EntityFrameworkCore":{"target":"Package","version":"[8.0.11, )"},"Npgsql.EntityFrameworkCore.PostgreSQL":{"target":"Package","version":"[8.0.11, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/share/dotnet/sdk/8.0.403/PortableRuntimeIdentifierGraph.json"}}
|
||||
"restore":{"projectUniqueName":"/home/laptop/RiderProjects/LootBoxSimulator/LootBoxSimulator/LootBoxSimulator.csproj","projectName":"LootBoxSimulator","projectPath":"/home/laptop/RiderProjects/LootBoxSimulator/LootBoxSimulator/LootBoxSimulator.csproj","outputPath":"/home/laptop/RiderProjects/LootBoxSimulator/LootBoxSimulator/obj/","projectStyle":"PackageReference","UsingMicrosoftNETSdk":false,"originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.EntityFrameworkCore":{"target":"Package","version":"[8.0.11, )"},"Microsoft.EntityFrameworkCore.Design":{"include":"Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive","suppressParent":"All","target":"Package","version":"[8.0.11, )"},"Npgsql.EntityFrameworkCore.PostgreSQL":{"target":"Package","version":"[8.0.11, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/share/dotnet/sdk/8.0.403/PortableRuntimeIdentifierGraph.json"}}
|
@ -1 +1 @@
|
||||
17333088740485110
|
||||
17333113237597597
|
@ -1 +1 @@
|
||||
17333088743484999
|
||||
17333113237597597
|
4
LootBoxSimulator/test_file
Normal file
4
LootBoxSimulator/test_file
Normal file
@ -0,0 +1,4 @@
|
||||
Name
|
||||
редкая
|
||||
очень редкая
|
||||
легендарная
|
Loading…
Reference in New Issue
Block a user