using CommunityToolkit.Mvvm.ComponentModel; using MvvmAppCore.Models; using System; namespace MvvmAppCore.ViewModels { public partial class MotorProfileViewModel : ObservableObject { [ObservableProperty] private string _motorName; private MotorProfile _motorProfile = new MotorProfile { MotorName = "Gantry", MotorNo = 1, Type = 2, Upr = 232 }; public MotorProfileViewModel() { MotorName = "Elevator"; System.Console.WriteLine($"Motor Name : {_motorProfile.MotorName}"); } } }