From 252c45ac00232eb40e8af6b2429474feaa3a62bf Mon Sep 17 00:00:00 2001 From: "ai.astrakhantsev" Date: Wed, 7 Dec 2022 15:23:10 +0500 Subject: [PATCH] #7987467 token --- .../Repository/CrudRepositoryBase.cs | 12 ++++++------ AsbCloudWebApi/Controllers/CrudController.cs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs b/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs index da51ab32..5cd4ac73 100644 --- a/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs +++ b/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs @@ -29,7 +29,7 @@ namespace AsbCloudInfrastructure.Repository { } /// - public virtual async Task> GetAllAsync(CancellationToken token = default) + public virtual async Task> GetAllAsync(CancellationToken token) { var entities = await GetQuery() .AsNoTracking() @@ -40,7 +40,7 @@ namespace AsbCloudInfrastructure.Repository } /// - public virtual async Task GetOrDefaultAsync(int id, CancellationToken token = default) + public virtual async Task GetOrDefaultAsync(int id, CancellationToken token) { var entity = await GetQuery() .AsNoTracking() @@ -65,7 +65,7 @@ namespace AsbCloudInfrastructure.Repository } /// - public virtual async Task InsertAsync(TDto item, CancellationToken token = default) + public virtual async Task InsertAsync(TDto item, CancellationToken token) { var entity = Convert(item); entity.Id = 0; @@ -76,7 +76,7 @@ namespace AsbCloudInfrastructure.Repository } /// - public virtual async Task InsertRangeAsync(IEnumerable items, CancellationToken token = default) + public virtual async Task InsertRangeAsync(IEnumerable items, CancellationToken token) { if (!items.Any()) return 0; @@ -98,7 +98,7 @@ namespace AsbCloudInfrastructure.Repository } /// - public virtual async Task UpdateAsync(TDto item, CancellationToken token = default) + public virtual async Task UpdateAsync(TDto item, CancellationToken token) { var existingEntity = await dbSet .AsNoTracking() @@ -116,7 +116,7 @@ namespace AsbCloudInfrastructure.Repository } /// - public virtual Task DeleteAsync(int id, CancellationToken token = default) + public virtual Task DeleteAsync(int id, CancellationToken token) { var entity = dbSet .AsNoTracking() diff --git a/AsbCloudWebApi/Controllers/CrudController.cs b/AsbCloudWebApi/Controllers/CrudController.cs index 0decf79a..4d1442aa 100644 --- a/AsbCloudWebApi/Controllers/CrudController.cs +++ b/AsbCloudWebApi/Controllers/CrudController.cs @@ -26,9 +26,9 @@ namespace AsbCloudWebApi.Controllers { protected readonly TService service; - public Func> InsertForbidAsync { get; protected set; } = null; - public Func> UpdateForbidAsync { get; protected set; } = null; - public Func> DeleteForbidAsync { get; protected set; } = null; + public Func> InsertForbidAsync { get; protected set; } = null!; + public Func> UpdateForbidAsync { get; protected set; } = null!; + public Func> DeleteForbidAsync { get; protected set; } = null!; public CrudController(TService service) {