public bool SaveState(StateModel State) { if (NoSQLRepository.Count(state => state.Id == State.Id) > 0) { return(false); } return(NoSQLRepository.Save(State)); }