In order to separate application layers we need to move all "low-level" database related code into models.
In the scope of this task we need to encapsulate all models deletion functionality into models methods. We need to get rid of using session.delete() and session.commit() in our routes, because this is a database layer responsibility.
In order to separate application layers we need to move all "low-level" database related code into models.
In the scope of this task we need to encapsulate all models deletion functionality into models methods. We need to get rid of using session.delete() and session.commit() in our routes, because this is a database layer responsibility.