Changed category view to rely on db collation
This commit is contained in:
parent
baf39a9cd9
commit
b1d3031333
|
@ -54,11 +54,11 @@
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync() {
|
protected override async Task OnInitializedAsync() {
|
||||||
await using var context = await ContextFactory.CreateDbContextAsync();
|
await using var context = await ContextFactory.CreateDbContextAsync();
|
||||||
string category = WebUtility.UrlDecode(CategoryName).ToLower();
|
string category = WebUtility.UrlDecode(CategoryName);
|
||||||
await context.Set<Category>().LoadAsync();
|
await context.Set<Category>().LoadAsync();
|
||||||
Category = await context.Set<Category>()
|
Category = await context.Set<Category>()
|
||||||
.Include(c => c.Articles).ThenInclude(a => a.Author)
|
.Include(c => c.Articles).ThenInclude(a => a.Author)
|
||||||
.Include(c => c.Articles).ThenInclude(a => a.Categories)
|
.Include(c => c.Articles).ThenInclude(a => a.Categories)
|
||||||
.FirstOrDefaultAsync(c => c.Name.ToLower() == category);
|
.FirstOrDefaultAsync(c => c.Name == category);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue