Skip to content

Commit

Permalink
fix some todos from #594 (#618)
Browse files Browse the repository at this point in the history
* fix some todos from #594

* init seed for repeatable mock data
* set maxPersons to 1500

* Update Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft.Models/Context/SeedingContext.cs

* add using statement

* update global.json .net version

* update tasks
  • Loading branch information
DanielHabenicht authored Apr 12, 2020
1 parent ec8c281 commit 7949993
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 52 deletions.
38 changes: 3 additions & 35 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj"
],
"problemMatcher": "$tsc"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj"
],
"problemMatcher": "$tsc"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/Phonebook.Source.PeopleSoft/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj"
],
"problemMatcher": "$tsc"
}
]
}
"version": "2.0.0",
"tasks": []
}
39 changes: 25 additions & 14 deletions Phonebook.Source.PeopleSoft/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": ["build", "${workspaceFolder}/src/Phonebook.Source.PeopleSoft/Phonebook.Source.PeopleSoft.csproj"],
"problemMatcher": "$msCompile"
},
{
"label": "run",
"command": "dotnet",
"type": "process",
"args": ["run", "-p", "${workspaceFolder}/src/Phonebook.Source.PeopleSoft/"],
"problemMatcher": "$msCompile"
}
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": ["watch", "-p", "${workspaceFolder}/src/Phonebook.Source.PeopleSoft/", "run"],
"problemMatcher": "$msCompile"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Bogus;
using Microsoft.EntityFrameworkCore;
using System;
using System.IO;
using System.Linq;

Expand Down Expand Up @@ -33,6 +34,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);

// Freeze Seed in order to make debugging easier (keeping the same user Id's
Randomizer.Seed = new Random(8675309);

var roomNumbers = new[] { "1A", "2A", "3A", "4A", "5A", "6A", "1B", "2B", "3B", "4B", "5B", "6B", "1.004785", "N100.45", "545", "0.0454a", "Apl", "F-54689", "F54689" };

#region Location
Expand Down Expand Up @@ -196,7 +200,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)

#region Person

var maxPersons = 5000;
var maxPersons = 1500;
var PersonFaker = new Faker<Person>()
.StrictMode(false)
.Rules((f, b) =>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.1.102"
"version": "3.1.201"
}
}
}

0 comments on commit 7949993

Please sign in to comment.