Added repository function for creating new, detached, entity

- Removed commented out methods in CoreRepo