question

mokhtarsoholi-9665 avatar image
0 Votes"
mokhtarsoholi-9665 asked mokhtarsoholi-9665 answered

Item always null in blazor

Hi everyone i create blazor application.
this application get data from url but one of this url always is null

this is my code :
var rev =await Http.GetFromJsonAsync<Response>($"https://pwa.brandebash.ir/api/cultapi/reverse?lon=51.811177&lat=28.043600");

but when app is running i use inspect element and network tab can see this url have item but rev always is null why did happend?

dotnet-aspnet-core-blazor
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

this is my project picture

first image its for runtime and i see in network tab :

123923-screenshot-228.png
second image is breakpoint in my code and i see rev is null

123885-untitled.png


0 Votes 0 ·
screenshot-228.png (82.0 KiB)
untitled.png (152.6 KiB)
YiyiYou-MSFT avatar image YiyiYou-MSFT mokhtarsoholi-9665 ·

Hi,@mokhtarsoholi-9665,

can you share the code of web api?And check if the response data structure is the same with Response.

0 Votes 0 ·

1 Answer

mokhtarsoholi-9665 avatar image
0 Votes"
mokhtarsoholi-9665 answered

hi i solve it
forgot set {get;set;} in model class thanks

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.