Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overload for Blazor vm.GetProperty for property path #1584

Closed
rockfordlhotka opened this issue Apr 24, 2020 · 2 comments · Fixed by #1587
Closed

Add overload for Blazor vm.GetProperty for property path #1584

rockfordlhotka opened this issue Apr 24, 2020 · 2 comments · Fixed by #1587
Assignees

Comments

@rockfordlhotka
Copy link
Member

rockfordlhotka commented Apr 24, 2020

As per this thread: MarimerLLC/cslaforum#938

Consider adding an overload to the GetProperty method in ViewModel that accepts and expression similar to the For expression in a validation component. For example:

  var p = vm.GetProperty(() => vm.Model.Child.Name));

The idea is to allow creation of property info objects for the Model and children of the Model.

@rockfordlhotka rockfordlhotka added this to To do in Version 5.2.0 via automation Apr 24, 2020
@rockfordlhotka rockfordlhotka self-assigned this Apr 25, 2020
@rockfordlhotka rockfordlhotka moved this from To do to In progress in Version 5.2.0 Apr 25, 2020
rockfordlhotka added a commit to rockfordlhotka/csla that referenced this issue Apr 25, 2020
@rockfordlhotka
Copy link
Member Author

The resolution of this is that I added an overload to GetPropertyInfo to take an expression, so it is possible to get info on any property.

  var info = vm.GetPropertyInfo(() => vm.Model.Child.Name);

@github-actions
Copy link

github-actions bot commented Aug 7, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Version 5.2.0
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant