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); } }