Esempio n. 1
0
        public async Task DeleteGuardian_Deletes_AllRelatedRecords()
        {
            await _guardianService.DeleteGuardian("guardianId");

            await _eloRepository.Received(1).DeleteGuardianElos("guardianId");

            await _efficiencyRepository.Received(1).DeleteGuardianEfficiencies("guardianId");

            await _matchResultsRepository.Received(1).DeleteAllResultsForGuardian("guardianId");

            await _guardianRepository.Received(1).DeleteGuardian("guardianId");
        }
        public async Task <IActionResult> Delete([FromRoute] string guardianId)
        {
            var guardian = await _guardianService.DeleteGuardian(guardianId);

            return(Json(guardian));
        }