dee-u
dee-u

Reputation: 33

MVVM: Where to put the database CRUD?

Should the model save/delete itself from the database or should the logic be in the ViewModel? I'm just starting with MVVM so I am unsure.

Upvotes: 0

Views: 361

Answers (1)

I use repository pattern for CRUD operations. Create a folder named Repositories and put your repositories in it. Then you can call them in your ViewModel.

Upvotes: 1

Related Questions