Move generic CRUD logic into CRUDResource