blob: 0fc2d862117df3135104494bc208a50216163068 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using WikiWaka.Api.Models;
public static class DbInit
{
private static readonly Language[] languages = [
new() {
Id = 1,
LanguageCode = "nb-NO",
},
new() {
Id = 2,
LanguageCode = "nn-NO",
},
new() {
Id = 3,
LanguageCode = "en-US",
},
];
public static async Task InitializeLanguages(DbWikiWakaContext db)
{
await db.Language.AddRangeAsync(languages);
_ = await db.SaveChangesAsync();
}
}
|