2 changed files with 0 additions and 62 deletions
@ -1,28 +0,0 @@ |
|||||||
<Project Sdk="Microsoft.NET.Sdk"> |
|
||||||
|
|
||||||
<PropertyGroup> |
|
||||||
<OutputType>Exe</OutputType> |
|
||||||
<TargetFramework>net8.0</TargetFramework> |
|
||||||
<ImplicitUsings>enable</ImplicitUsings> |
|
||||||
<Nullable>enable</Nullable> |
|
||||||
</PropertyGroup> |
|
||||||
|
|
||||||
<ItemGroup> |
|
||||||
<ProjectReference Include="..\Contexts\Contexts.csproj"/> |
|
||||||
<ProjectReference Include="..\Model\Model.csproj"/> |
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="8.0.14"/> |
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.14"/> |
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.14"> |
|
||||||
<PrivateAssets>all</PrivateAssets> |
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
|
||||||
</PackageReference> |
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.14"/> |
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.14"/> |
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.14"> |
|
||||||
<PrivateAssets>all</PrivateAssets> |
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
|
||||||
</PackageReference> |
|
||||||
</ItemGroup> |
|
||||||
|
|
||||||
</Project> |
|
||||||
@ -1,34 +0,0 @@ |
|||||||
using System.Text.Json; |
|
||||||
using Contexts; |
|
||||||
using Microsoft.EntityFrameworkCore; |
|
||||||
|
|
||||||
var webProjectName = "IGP"; |
|
||||||
var projectPath = $"{Environment.CurrentDirectory}/../../../.."; |
|
||||||
var webPath = $"{projectPath}/{webProjectName}/wwwroot/generated"; |
|
||||||
|
|
||||||
var options = new DbContextOptionsBuilder<DatabaseContext>(); |
|
||||||
options.UseSqlite($"Filename={projectPath}/{webProjectName}/Database.db"); |
|
||||||
|
|
||||||
// Load our database |
|
||||||
using (var db = new DatabaseContext(options.Options)) |
|
||||||
{ |
|
||||||
// And save data in format Blazor Wasm can use |
|
||||||
File.WriteAllTextAsync($"{webPath}/GitPatchModels.json", JsonSerializer.Serialize(db.GitPatchModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/GitChangeModels.json", JsonSerializer.Serialize(db.GitChangeModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/AgileSprintModels.json", JsonSerializer.Serialize(db.AgileSprintModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/AgileTaskModels.json", JsonSerializer.Serialize(db.AgileTaskModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/WebSectionModels.json", JsonSerializer.Serialize(db.WebSectionModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/WebPageModels.json", JsonSerializer.Serialize(db.WebPageModels)); |
|
||||||
|
|
||||||
File.WriteAllTextAsync($"{webPath}/DocContentModels.json", JsonSerializer.Serialize(db.DocContentModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/DocConnectionModels.json", JsonSerializer.Serialize(db.DocConnectionModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/DocSectionModels.json", JsonSerializer.Serialize(db.DocSectionModels)); |
|
||||||
|
|
||||||
File.WriteAllTextAsync($"{webPath}/NoteContentModels.json", JsonSerializer.Serialize(db.NoteContentModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/NoteConnectionModels.json", JsonSerializer.Serialize(db.NoteConnectionModels)); |
|
||||||
File.WriteAllTextAsync($"{webPath}/NoteSectionModels.json", JsonSerializer.Serialize(db.NoteSectionModels)); |
|
||||||
|
|
||||||
// Set date variable |
|
||||||
db.Variables.Find("LastUpdated")!.Value = $"{DateTime.Now:MMMM dd, yyyy}"; |
|
||||||
File.WriteAllTextAsync($"{webPath}/Variables.json", JsonSerializer.Serialize(db.Variables)); |
|
||||||
} |
|
||||||
Loading…
Reference in new issue