Move save Operation from API controller into Repository.