Comet
Comet copied to clipboard
How to deal with DTOs
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 ?
There is a SourceGenerator, that will auto wrap any standard class to handle INotifiyProperytChanges: GenerateStateClassAttribute. This will make it easy to use!