public async Task SaveICO(ICOInput input) { try { var user = await _userRepository.FirstOrDefaultAsync(item => item.Id == AbpSession.UserId); if (user != null) { user.CompanyTenant = input.CompanyTenant; user.TokenDescription = input.TokenDescription; user.TokenName = input.TokenName; user.WiredInstruction = input.WiredInstruction; await _userRepository.UpdateAsync(user); } } catch (Exception ex) { throw new UserFriendlyException(ex.Message); } }
public async Task <ICOInput> GetICO() { try { var user = await _userRepository.FirstOrDefaultAsync(item => item.Id == AbpSession.UserId); if (user != null) { var outputICO = new ICOInput() { CompanyTenant = user.CompanyTenant, TokenDescription = user.TokenDescription, TokenName = user.TokenName, WiredInstruction = user.WiredInstruction }; return(outputICO); } throw new Exception(); } catch (Exception ex) { throw new UserFriendlyException(ex.Message); } }