Код: Выделить всё
public partial class Model1 : ObservableObject
{
//Variables that are mapped from the DB call directly:
public int id { get; set; }
public int categoryId { get; set; }
...
//Variables not mapped from the DB:
[ObservableProperty]
public string? backgroundColor;
public bool ShowDate => ItemCheckedDate != null && ItemCheckedDate!= DateTime.MinValue ? true : false;
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(ShowDate))]
public DateTime? itemCheckedDate;
}
Код: Выделить всё
Model1Это запах кода? И если да, то как я могу смягчить эту проблему?
Подробнее здесь: https://stackoverflow.com/questions/790 ... el-classes
Мобильная версия