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

How to deal with DTOs #260

Open
Martinn2 opened this issue Jun 8, 2022 · 1 comment
Open

How to deal with DTOs #260

Martinn2 opened this issue Jun 8, 2022 · 1 comment

Comments

@Martinn2
Copy link

Martinn2 commented Jun 8, 2022

For me, one of the main reasons to do front end development in C# is the ability to share models (DTOs) between ASP.NET CORE API and UI.

When using MVVM it is possible only to share interfaces because UI properties must implement INotifyPropertyChange.

In Blazor, sharing is possible as no interface is needed.

Commet seems to me the same as MVVM in this point of view as it needs INotifyProertyRead.

Is there any way / plan how to use shared DTO returned from API and bind to them from UI ?

@Clancey
Copy link
Collaborator

Clancey commented Jun 8, 2022

There is a SourceGenerator, that will auto wrap any standard class to handle INotifiyProperytChanges: GenerateStateClassAttribute. This will make it easy to use!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants