Ejemplo n.º 1
0
        public Response AddState(State state)
        {
            Response response = new Response();

            if (carsRepository.GetStates().Any(s => s.StateName == state.StateName))
            {
                response.Success = false;
                response.Message = "ERROR: state exists";
                return(response);
            }
            carsRepository.AddState(state);
            response.Success = true;
            response.Message = "state added";
            return(response);
        }