kunio_kun
CosmosDB Linq GroupBy
Hi, it is my first project using CosmosDB and it seems like GroupBy is not supported in CosmosDB Linq. Is there any workarounds for this? I prefer not writing the SQL-like syntax if possible, and not pulling everything from the db and process in memory..
Thanks in advance
3 replies
❔ Avalonia Apply Theme at Design Time
Hi, I've just getting started with Avalonia and I'm trying to use the Semi.Avalonia theme. I included the theme as instructed in the github but the designer in Avalonia Rider still previews in Fluent light theme. Is there a way to make the preview follow the theme we set in
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml"></StyleInclude>
</Application.Styles>
?
Thanks in advance2 replies
❔ Serving SPA on ASP.NET Core MVC Web API
Hi, I'm trying to serve SPA in a folder
client
in BaseDirectory. I want it to be served in "/".
Here's what I tried
And the fallback controller implementation is
But when i navigate to /
, I am getting
How do I do this correctly? Thanks in advance.24 replies
NuGet on Specific TFM in one project
I'm writing a class library that multitargets netstandard 2.1, and .net 6, and the library depends on System.Text.Json, which exisits built in .net 6. Is there a way to include System.Text.Json only for the build for netstandard 2.1?
1 replies
❔ Including wwwroot folder
Hi, I started a webapi ASP.NET Core project and now i need views and wwwroot stuff but I realized that wwwroot folder isn't copied on build. I've taken a look at projects with webapp template but i dont see wwwroot included manually in the csproj file. What is the correct way to do this? Thanks in advance
2 replies
Update Multiple Entities in One Query EF Core
I'm looking for a way to update multiple entities, something that represents
I've googled around and answers seems to execute a select-where query first then update each entity using a loop, then update them one by one.
Is there a way for this? Thanks in advance
16 replies
❔ ASP.NET Core MVC Put Value to Route on Form Submit
Hi,
I have this action on
Home
controller
I want index to accept filter options on filters
, but I realized that although that I don't enter any values in input fields, the model filters
won't ever be null. So I can't check for filters
to be null since it is not even null when the route is /
.
I was thinking maybe i can add that enableFilter
into that action, and then have asp-route-enableFilter
on my form,
but i also realized even if i submit the form, it does not put enableFilter
query string on the route.
Is there a way to achieve this?
Thanks in advance21 replies
ASP NET Core 6 Launch without Debugging doesn't block Background Service but Debug Does
Hi,
I'm trying to have a ASP.NET Core BackgroundService run really in background, i mean really don't interrupt with request/response part and I've been trying many stuff
That is the code i currently have, and one weird thing is if I debug the code, the service blocks the program execution, while if I use run, it doesn't block and continue as expected.
Is there any mistakes there?
Also, is there other ways to do this? I tried Task.Run(), Task.Factory.StartNew() and they all block.
I'm on Jetbrains Rider on Ubuntu 20.04 if that matters for the threading part.
Thanks in advance!
155 replies
Dependency Injection in ASP.NET Core and issue with null suppresion
Hi, I'm having some issues with null suppression and dependency injection in ASP.NET Core
I have this block of code
And it wasn't able to resolve
I also tried with DbContext
And the returns
null
, but doesn't throw. Isn't it supposed to throw for being null?
Also why is it returning null instead of telling that it is not able to resolve service?
Edit: AppDb
is a class that inherrits from DbContext
Thanks in advance13 replies