public async Task <DResult> Create([FromBody] VAccountInput input) { var dto = input.MapTo <AccountInputDto>(); var result = await _contract.CreateAsync(dto); return(result != null ? Success : Error("创建账户失败")); }
public async Task CreateTest() { var dto = await _contract.CreateAsync(new AccountInputDto { Account = "test", Nick = "Test", Password = "******", Role = AccountRole.Project, ProjectId = "323abe0282bfc175d05008d85a52a973" }); Assert.AreNotEqual(dto, null); Print(dto); }