From 19bb4631a7c0b57c8da19ca7aa89864ac1555836 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 13 May 2021 13:31:51 +0300 Subject: Made GetAll async --- tools/add-feature-template.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/add-feature-template.sh b/tools/add-feature-template.sh index b5ab0da..c5ebe45 100755 --- a/tools/add-feature-template.sh +++ b/tools/add-feature-template.sh @@ -131,11 +131,11 @@ namespace $project_name.Services.Services return this._autoMapper.Map<${feature_name}ServiceModel>(curr$feature_name); } - public List<${feature_name}ServiceModel> GetAll() + public async Task> GetAll() { - return this._context.${feature_name}s + return await this._context.${feature_name}s .Select(x => this._autoMapper.Map<${feature_name}ServiceModel>(x)) - .ToList(); + .ToListAsync(); } public async Task EditAsync(Edit${feature_name}ServiceModel edit${feature_name}ServiceModel) -- cgit v1.2.3