bahriddin-abdusalomov-resume.pdf
https://youtu.be/Nje8KfTYczo?si=i-CAJLwq2lrYtEuM
https://github.com/bahriddin-abdusalomov/todo-web-app.git
Projectni ishlatish uchun Server
va Database
qismi o'zingizning databasengizga mos ravishda o'zgartirilishi kerak boladi
CORS
package yukab olinadi
<PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
Program.cs
filega CORS
ni qo'shish kerak
Blazor
layerdagi Program.cs
filega qo'shiladi
API
layerdan malumotlarni olish quyidacha boladi
private readonly HttpClient httpClient;
public TaskService(HttpClient httpClient)
{
this.httpClient = httpClient;
}
public async Task<IList<TaskModel>?> GetTasks()
{
var tasks = await httpClient.GetFromJsonAsync<IList<TaskModel>>("api/Tasks/GetTasks");
return tasks;
}