public void Add(T entry, IGetId <T> idGetter) { if (idGetter == null) { throw new ArgumentNullException(nameof(idGetter)); } AddInternal(idGetter.GetId(entry), entry); }
/// <summary> /// 注册 /// </summary> /// <returns></returns> public async Task <IActionResult> Register(RegisterInputDto registerInputDto) { var id = _getId.GetId(EntityType.Account); var result = await _accountApplication.CreatedAccount(id, registerInputDto.AccountName, registerInputDto.Password, registerInputDto.PhoneNumber); if (result.Success) { return(RedirectToAction("Index", "Home")); } return(RedirectToAction("Index", "Error")); }