added db and generic repository