C-injectivity and C-projectivity