public IActionResult Delete(DeleteFeatureViewModel feature)
 {
     if (feature.decisionControll)
     {
         var featureToDelete = _unityOfWork.Feature.GetById(feature.ID);
         _unityOfWork.Feature.Delete(featureToDelete);
         _unityOfWork.Save();
     }
     return(RedirectToAction("Index"));
 }
        public IActionResult Delete(long id)
        {
            var feature         = _unityOfWork.Feature.GetFeatureForDeleteById(id);
            var featureToDelete = new DeleteFeatureViewModel()
            {
                ID          = feature.ID,
                Description = feature.Description,
                Name        = feature.Name,
            };

            foreach (var type in feature.TypeFeature)
            {
                featureToDelete.typeNames.Add(_unityOfWork.Type.GetById(type.DeviceTypeID).Name);
            }



            return(View(featureToDelete));
        }