public async Task <IActionResult> Edit(EditOrganizationInputModel input) { var user = await this.userManager.GetUserAsync(this.User); var viewModel = this.organizationsService.GetById <EditOrganizationInputModel>(user.Id); await this.organizationsService.UpdateAsync(input); return(this.RedirectToAction("Index")); }
public async Task <int> UpdateAsync(EditOrganizationInputModel input) { var organization = await this.organizationRepository.GetByIdWithDeletedAsync(input.Id); await this.addressesService.UpdateAsync(input.Address); organization.Name = input.Name; organization.Description = input.Description; organization.Industry = input.Industry; this.organizationRepository.Update(organization); return(await this.organizationRepository.SaveChangesAsync()); }