public async Task <Models.Squad> UpdateAsync(Models.Squad squad, string userId) { var squadInDb = await _squadRepository.GetAsync(userId); if (!await _squadValidationService.Validate(squad, squadInDb.Id, userId)) { throw new System.Exception("Squad is not valid."); } return(await _squadRepository.UpdateAsync(squad)); }