private void ValidateResourceTechnolgies(ResourceTechnologiesAddViewModel viewModel)
 {
     if (ModelState.IsValidField("ResourceId") &&
         ModelState.IsValidField("TechnologyId"))
     {
         if (_resourcesRepository.ResourceHasTechnologyAlready(viewModel.ResourceId, viewModel.TechnologyId))
         {
             ModelState.AddModelError("TechnologyId",
                                      "This technology already exists for this resource.");
         }
     }
 }