コード例 #1
0
 private async void AddUserRole_Click(object sender, RoutedEventArgs e)
 {
     if (UserRoleNameWillBeAdded.Text != "")
     {
         string name = UserRoleNameWillBeAdded.Text;
         var    obj  = new { Name = name };
         await UserRoleManager.AddUserRole(new StringContent(JsonConvert.SerializeObject(obj), Encoding.UTF8, "application/json"), UserRoles);
     }
 }