public LanguageCandidate(Guid id, Guid candidateId, Guid languageId, FluencyLevel fluencyLevel) { Id = id; CandidateId = candidateId; LanguageId = languageId; FluencyLevel = fluencyLevel; }
public UpdateLanguageFluencyLevelCommand(Guid languageCandidateId, Guid candidateId, FluencyLevel fluencyLevel) { AggregateId = candidateId; LanguageCandidateId = languageCandidateId; CandidateId = candidateId; FluencyLevel = fluencyLevel; }
public static bool Validate(this FluencyLevel enumValue) { if (Enum.IsDefined(typeof(FluencyLevel), enumValue)) { return(true); } return(false); }
public AddLanguageCandidateCommand(Guid id, Guid candidateId, Guid languageId, FluencyLevel fluencyLevel) { AggregateId = candidateId; Id = id; CandidateId = candidateId; LanguageId = languageId; FluencyLevel = fluencyLevel; }
private bool FluencyLevelValidate(FluencyLevel fluencyLevel) { return(fluencyLevel.Validate()); }
public void UpdateFluencyLevel(FluencyLevel fluencyLevel) { FluencyLevel = fluencyLevel; }
public void UpdateFluencyLevel(LanguageCandidate languageCandidate, FluencyLevel fluencyLevel) { DeleteLanguageCandidate(languageCandidate); languageCandidate.UpdateFluencyLevel(fluencyLevel); AddLanguageCandidate(languageCandidate); }
public async Task <ActionResult> LanguageFluencyLevel(Guid languagecandidateId, [FromBody] FluencyLevel fluencyLevelRating) { if (!fluencyLevelRating.Validate()) { NotifierError("Nivel de fluencia inválido."); return(CustomResponse()); } if (languagecandidateId == Guid.Empty) { NotifierError("Id invalido."); return(CustomResponse()); } var languageCandidate = await GetCandidateLanguageById(languagecandidateId); if (languageCandidate == null) { NotifierError("Idioma inválido"); return(CustomResponse()); } if (languageCandidate.CandidateId != _candidateId) { NotifierError("Esse registro não pertence ao usuário logado."); return(CustomResponse()); } var command = new UpdateLanguageFluencyLevelCommand(languagecandidateId, _candidateId, fluencyLevelRating); var response = await _mediatorHandler.SendCommand(command); if (!response.IsValid) { return(CustomResponse(response)); } return(CustomResponse(await GetCandidateLanguageById(languagecandidateId))); }
public async Task LanguageLeveLanguagePerson(Guid languagePersonId, FluencyLevel fluencyLevel) { await this._personService.LanguageLeveLanguagePerson(languagePersonId, fluencyLevel); }