//using for active and deactive user public void SetStatusTrailer(string id) { var trailerToRemove = _trailerRepository.Get(c => c.TrailerC == id); if (trailerToRemove.IsActive == Constants.ACTIVE) { trailerToRemove.IsActive = Constants.DEACTIVE; } else { trailerToRemove.IsActive = Constants.ACTIVE; } _trailerRepository.Update(trailerToRemove); SaveTrailer(); }