Stefanidze
✅ How can i bind a value to an item on render in blazor?
I use the following layout:
But when the user clicks on an item it tries to get next
i
value, for example if a database has 3 items (including null item) i
will be 4, resulting in an IndexOutOfRangeException
. How can i make i
value somehow bind to the item on render in a way that i can get it in code?12 replies
Can i use async/await in class constructors?
I want my class constructor to send data to the database, so every instance of the class is synced with the corresponding item in the database. The problem is that database uses async, and i want to wait for the database to process the request, to output unique id, for me to use it later. Is there any way i can do that?
6 replies
What is the up-to-date version of AspNet.WebAPI?
I am upgrading my console application to include Web Api, so i changed the sdk from
Microsoft.NET.Sdk
to Microsoft.NET.Sdk.Web
, and this resulted in project restoring Microsoft.AspNet.WebApi
and Microsoft.AspNet.WebApi.Cors
. But now when i build or run my project i get warning NU1701
In the output it shows that it cannot restore these two packages with net8.0 but instead they work only with .NET framework. From this i assume that these packages are legacy and need to be replaced, but i couldn't find any information about it. Is there any up-to-date version, for example based on AspNetCore? I use VSCode. Full output of the warning8 replies