upizs / PestControl

Self-made bug tracker for personal use. Implementing ASP.NET Core .NET 5 with razor pages, Entity Framework 5.0.9 and AspNetCore Identity 2.2.0
7 stars 0 forks source link

Missing CancellationTokens #3

Open Nobonex opened 2 years ago

Nobonex commented 2 years ago

https://github.com/upizs/PestControl/blob/d82b6e941e797fba15f85d0c73399e37ab32836a/TicketControl.Data/Contracts/IGenericRepository.cs#L10

All of the async methods are missing a CancellationToken. If a call is aborted, the server wil now always go through with the query even though the result will never be used.

Nobonex commented 2 years ago

A good video explaining CancellationTokens: https://www.youtube.com/watch?v=b5dyPJ3zyRg

upizs commented 2 years ago

@Nobonex Thanks for your feedback, And With the video, that's GOLD :) I'll check it out.