Lets say you have a class like this:
public class InitialData
{
public int InitialDataID { get; set; }
public string InitialDataName { get; set; }
public string InitialDataDescription { get; set; }
}
I want to create another class named InitialDataView:
public partial class InitialDataView : ObservableObject
{
// For each InitialData property, create an ObservableProperty
[ObservableProperty]
int _InitialDataID;
[ObservableProperty]
string _InitialDataName;
[ObservableProperty]
string _InitialDataDescription;
}
In a way that for every field I add (ex int newField) in InitialData the InitialDataView is auto updated and the corresponding field is added (ex [ObservableProperty] int newField;)
I can add them one by one but I want to find a better way.