Fixed repository and added SaveOrUpdate method