| | |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderBy(t => t.Sort) |
| | | .OrderByDescending(x=>x.CreationTime) |
| | | .FirstOrDefaultAsync(t => t.$ValidateRepeatName$ == name, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | |
| | | .IncludeDetails(includeDetails) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderBy(sorting.IsNullOrEmpty() ? nameof($EntityName$.Sort) : sorting) |
| | | .OrderByDescending(x=>x.CreationTime) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |