Ray
Ray

Reputation: 510

Sqlite's [Ignore] not working with CommunityToolkit.Mvvm's [ObservableProperty]

I have a field in my Model that I want to [Ignore] during SqliteConnection.CreateTable<myModel> but I also use the CommunityToolkit.Mvvm [ObservableProperty] and this is causing an error for the [Ignore].

Attribute 'attribute' is not valid on this declaration type. It is valid on 'type' declarations only.

[ObservableProperty]
[Ignore]
private Image imgStream;

How can I have this field ignored at the time of table creation but still use the CTKM ObservableObject?

Upvotes: 1

Views: 177

Answers (0)

Related Questions