914 B
914 B
- UI state properties follow the
SetProperty(ref _field, value)pattern inherited fromBaseViewModel, with filter setters additionally callingApplyFilter()to re-query the database. - Commands are exposed as lazy-initialized read-only properties using
??=withnew RelayCommand(...)/new RelayCommandAsync(...), guarded by a can-execute lambda overSelectedItem. - Background work uses
Task.Runfollowed by.ContinueWithor_dispatcher.Invoke/_dispatcher.InvokeAsyncto marshal results back onto the UI thread before touchingObservableCollections. - Long-running async operations wrap their body in try/catch/finally that sets
Loading = falseand surfaces errors throughMessageBox.Showwith localizedStrings.Error. - LiteDB entities are plain POCOs annotated with
[BsonId]and stored in collections created viadatabase.GetCollection<T>("name")withEnsureIndex(x => x.Id).