[Authorize]     //tylko uzytkownik zalogowany bedzie mial uprawnienia
        public ViewResult Edit(int id)
        {
            Units             unit = unitRepository.GetUnits(id);
            UnitEditViewModel unitEditViewModel = new UnitEditViewModel
            {
                Name              = unit.Name,
                Attack            = unit.Attack,
                Defense           = unit.Defense,
                min_Damage        = unit.min_Damage,
                max_Damage        = unit.max_Damage,
                Health            = unit.Health,
                Faction           = unit.Faction,
                ExistingPhotoPath = unit.PhotoPath
            };

            return(View(unitEditViewModel));
        }