Extra utility-page created , putting all stockgroups in place

This commit is contained in:
2022-10-12 21:05:33 +02:00
parent 6e2eb207a3
commit 0cb51d70cb
8 changed files with 63 additions and 7 deletions

View File

@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BrowserHelper\BrowserHelper.csproj" />
<ProjectReference Include="..\DataDomain\DataDomain.csproj" />
</ItemGroup>

View File

@ -1,5 +1,7 @@
using DataDomain;
using BrowserHelper.Settings;
using DataDomain;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
@ -10,6 +12,7 @@ namespace DatamodelLibrary
{
public class StockContext : DbContext
{
public DbSet<StockMember> Stocks { get; set; }
public DbSet<Person> Persons { get; set; }
public DbSet<Address> Addresses { get; set; }
@ -17,7 +20,9 @@ namespace DatamodelLibrary
public DbSet<BackupRegister> BackupRegings { get; set; }
public DbSet<StockGroupModel> StockGroups { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder options)
=> options.UseSqlite(@"Data Source=.\Stocks.db");
=> options.UseSqlite("Data Source=C:\\Aktier\\net6.0-windows\\NewData\\Stocks.db");
//=> options.UseSqlite(@"Data Source=.\Stocks.db");
}
}