Exemplo n.º 1
0
 public Task <Resp <long> > AddRoleBind([FromBody] AddRoleUserReq req)
 {
     return(ModelState.IsValid
         ? _service.AddRoleBind(req.ToMo())
         : Task.FromResult(GetInvalidResp <long>()));
 }
Exemplo n.º 2
0
 public Task <IdResp <string> > AddRoleBind([FromBody] AddRoleUserReq req)
 {
     return(ModelState.IsValid
         ? _service.AddRoleBind(req.ToMo())
         : Task.FromResult(new IdResp <string>().WithResp(GetInvalidResp())));
 }