public void active(long gallery_id) { try { var gallery = _galleryRepository.getById(gallery_id); if (gallery == null) { throw new ItemNotFoundException($"Gallery with id {gallery_id} doesnot exist."); } gallery.is_active = true; _galleryRepository.update(gallery); } catch (Exception) { throw; } }