修改仓储批量更新和批量删除方法
This commit is contained in:
@@ -112,7 +112,7 @@ namespace IRaCIS.Application.Services
|
||||
_mapper.Map(trialExperienceViewModel, needUpdate);
|
||||
await _repository.UpdateAsync(needUpdate);
|
||||
|
||||
await _repository.DeleteFromQueryAsync<TrialExperienceCriteria>(t => t.TrialExperienceId == needUpdate.Id);
|
||||
await _repository.BatchDeleteAsync<TrialExperienceCriteria>(t => t.TrialExperienceId == needUpdate.Id);
|
||||
|
||||
List<TrialExperienceCriteria> criteriaList = new List<TrialExperienceCriteria>();
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace IRaCIS.Application.Services
|
||||
[HttpDelete, Route("{doctorId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialExperience(Guid doctorId)
|
||||
{
|
||||
var success = await _repository.DeleteFromQueryAsync<TrialExperience>(o => o.Id == doctorId);
|
||||
var success = await _repository.BatchDeleteAsync<TrialExperience>(o => o.Id == doctorId);
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
/// <summary>
|
||||
@@ -152,7 +152,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
//_attachmentRepository.Delete(t => t.DoctorId == updateGCPExperienceParam.Id && t.Type == StaticData.GCP);
|
||||
|
||||
var successs = await _repository.UpdateFromQueryAsync<Doctor>(o => o.Id == updateGCPExperienceParam.Id, u => new Doctor()
|
||||
var successs = await _repository.BatchUpdateAsync<Doctor>(o => o.Id == updateGCPExperienceParam.Id, u => new Doctor()
|
||||
{
|
||||
GCP = updateGCPExperienceParam.GCP,
|
||||
GCPId = updateGCPExperienceParam.GCP==0&&updateGCPExperienceParam.GCPId==null?Guid.Empty: updateGCPExperienceParam.GCPId!.Value
|
||||
@@ -160,7 +160,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (updateGCPExperienceParam.GCP == 0 && updateGCPExperienceParam.GCPId != null)
|
||||
{
|
||||
await _repository.DeleteFromQueryAsync<Attachment>(a => a.Id == updateGCPExperienceParam.GCPId);
|
||||
await _repository.BatchDeleteAsync<Attachment>(a => a.Id == updateGCPExperienceParam.GCPId);
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> UpdateOtherExperience(ClinicalExperienceCommand updateOtherClinicalExperience)
|
||||
{
|
||||
var success = await _repository.UpdateFromQueryAsync<Doctor>(o => o.Id == updateOtherClinicalExperience.DoctorId, u => new Doctor()
|
||||
var success = await _repository.BatchUpdateAsync<Doctor>(o => o.Id == updateOtherClinicalExperience.DoctorId, u => new Doctor()
|
||||
{
|
||||
OtherClinicalExperience = updateOtherClinicalExperience.OtherClinicalExperience ?? string.Empty,
|
||||
OtherClinicalExperienceCN = updateOtherClinicalExperience.OtherClinicalExperienceCN ?? string.Empty
|
||||
|
||||
Reference in New Issue
Block a user