public async Task <Unit> Handle(UpdateProfilOptionCommand <DocumentType> request, CancellationToken cancellationToken) { var documentType = await _context.DocumentTypes.FindAsync(request.Id); documentType.Name = request.Name; _context.Update(documentType); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <Sex> request, CancellationToken cancellationToken) { var sex = await _context.FindAsync <Sex>(request.Id); sex.Name = request.Name; _context.Update(sex); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <Availability> request, CancellationToken cancellationToken) { var availability = await _context.Set <Availability>().FindAsync(request.Id); availability.Name = request.Name; _context.Update(availability); await _context.SaveChangesAsync(); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <IncomeSource> request, CancellationToken cancellationToken) { var incomeSource = await _context.IncomeSources.FindAsync(request.Id); incomeSource.Name = request.Name; _context.Update(incomeSource); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <HeardOfUsFrom> request, CancellationToken cancellationToken) { var heardOfUs = await _context.HeardOfUsFroms.FindAsync(request.Id); heardOfUs.Name = request.Name; _context.Update(heardOfUs); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <VolunteeringType> request, CancellationToken cancellationToken) { var volonteeringType = _context.VolunteeringTypes.Find(request.Id); volonteeringType.Name = request.Name; _context.Update(volonteeringType); await _context.SaveChangesAsync(); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <ChildrenAgeBracket> request, CancellationToken cancellationToken) { var childrenAgeBracked = await _context.FindAsync <ChildrenAgeBracket>(request.Id); childrenAgeBracked.Name = request.Name; _context.Update(childrenAgeBracked); await _context.SaveChangesAsync(); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <SkillToDevelop> request, CancellationToken cancellationToken) { var skill = await _context.SkillToDevelops.FindAsync(request.Id); skill.Name = request.Name; _context.Update(skill); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <CitizenStatus> request, CancellationToken cancellationToken) { var citizenStatus = await _context.Set <CitizenStatus>().FindAsync(request.Id); citizenStatus.Name = request.Name; _context.Update(citizenStatus); await _context.SaveChangesAsync(); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <Parent> request, CancellationToken cancellationToken) { var parent = await _context.Parents.FindAsync(request.Id); parent.Name = request.Name; _context.Update(parent); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <Schooling> request, CancellationToken cancellationToken) { var schooling = await _context.Schoolings.FindAsync(request.Id); schooling.Name = request.Name; _context.Update(schooling); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <Language> request, CancellationToken cancellationToken) { var language = await _context.Languages.FindAsync(request.Id); language.Name = request.Name; _context.Update(language); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <MaritalStatus> request, CancellationToken cancellationToken) { var maritalStatus = await _context.MaritalStatuses.FindAsync(request.Id); maritalStatus.Name = request.Name; _context.Update(maritalStatus); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <LegalCustody> request, CancellationToken cancellationToken) { var legalCustody = await _context.LegalCustodies.FindAsync(request.Id); legalCustody.Name = request.Name; _context.Update(legalCustody); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <YearlyIncome> request, CancellationToken cancellationToken) { var yearlyIncome = await _context.FindAsync <YearlyIncome>(request.Id); yearlyIncome.Name = request.Name; _context.Update(yearlyIncome); await _context.SaveChangesAsync(cancellationToken); return(Unit.Value); }
public async Task <Unit> Handle(UpdateProfilOptionCommand <TransportType> request, CancellationToken cancellationToken) { var transportType = await _context.TransportTypes .Where(t => t.IsDelete == false && t.Id == request.Id) .SingleAsync(); transportType.Name = request.Name; _context.Update(transportType); await _context.SaveChangesAsync(); return(Unit.Value); }