We have been using WPF application, however we were using it similar to web forms project. With most of the code in the code behind. Its like a 3 tier architecture with Views, Controller and Entity (ADO.NET CRUD operations) for Database. I am trying to convert my application from this type of coding to MVVM. I have been following mutilple tutorials on the internet and its very confusing to figure out as to where things go especially model and view model. Some of the tutorials use entity framework and we cant use that as our DB is AS400 and the license for entity framework to be used with AS400 is very high. So we have to use ADO.NET.
I wanted to know mostly
Where do we write the ADO.NET code for CRUD operations? Is it Models or View Models or a seperate Class and just call that class. If it is a seperate class, do we call it from Models or ViewModels?
If I have a function like calulate tax or some buisness logic, should I write it in the setter of models? Where does buisness logic go to?