public Task Handle(UploadDataDeleted message) { JobAssign jobAssign = GetJobAssignByFileId(Guid.Parse(message.SourceId));// source id here is a file id return(UpdateJobAssign(jobAssign.Id, Builders <JobAssign> .Update.Pull(f => f.UploadList, jobAssign.UploadList.FirstOrDefault(x => x.FileId == Guid.Parse(message.SourceId))))); }
private void Apply(UploadDataDeleted e) { IsDeleted = true; }