public async Task <ActionResult> All() { var dbResult = _candidatesRepo.All(); var mapResult = _mapper.Map <List <Cv>, List <CandidateDto> >(dbResult); string result = JsonConvert.SerializeObject(mapResult, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver(), ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); return(Content(result, "application/json")); }