IProcessMapPlanRepository поправил документацию, переименовал метод

This commit is contained in:
ngfrolov 2023-07-25 16:40:25 +05:00
parent c3aa8d443a
commit 7ba021c9e7
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7
3 changed files with 9 additions and 9 deletions

View File

@ -9,12 +9,12 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Repositories
{
/// <summary>
/// РТК
/// РТК-план
/// </summary>
public interface IProcessMapPlanRepository : IRepositoryWellRelated<ProcessMapPlanDto>
{
/// <summary>
/// Получить параметры бурения начиная с даты.
/// Получить РТК-план начиная с даты.
/// </summary>
/// <param name="idWell"></param>
/// <param name="updateFrom"></param>
@ -24,7 +24,7 @@ namespace AsbCloudApp.Repositories
DateTime? updateFrom, CancellationToken token = default);
/// <summary>
/// Получить параметры бурения
/// Получить РТК-план
/// </summary>
/// <param name="requests"></param>
/// <param name="token"></param>
@ -33,11 +33,11 @@ namespace AsbCloudApp.Repositories
CancellationToken token);
/// <summary>
/// Удалить РТК
/// Удалить РТК-план по скважине
/// </summary>
/// <param name="idWell"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<int> RemoveRangeAsync(int idWell, CancellationToken cancellationToken);
Task<int> RemoveByWellAsync(int idWell, CancellationToken cancellationToken);
}
}

View File

@ -60,11 +60,11 @@ namespace AsbCloudInfrastructure.Repository
return dtos;
}
public Task<int> RemoveRangeAsync(int idWell, CancellationToken cancellationToken)
public Task<int> RemoveByWellAsync(int idWell, CancellationToken cancellationToken)
{
var entitites = dbContext.ProcessMap.Where(x => x.IdWell == idWell);
var query = dbContext.ProcessMap.Where(x => x.IdWell == idWell);
dbContext.ProcessMap.RemoveRange(entitites);
dbContext.ProcessMap.RemoveRange(query);
return dbContext.SaveChangesAsync(cancellationToken);
}

View File

@ -62,7 +62,7 @@ public class ProcessMapPlanImportService : IProcessMapPlanImportService
var processPlanMaps = ParseWorkBook(workBook);
if (deleteProcessMapPlansBeforeImport)
await processMapPlanRepository.RemoveRangeAsync(idWell, cancellationToken);
await processMapPlanRepository.RemoveByWellAsync(idWell, cancellationToken);
foreach (var processPlanMap in processPlanMaps)
{