Exemplo n.º 1
0
        public Response AddFinancing(string financing)
        {
            Response response = new Response();

            if (carsRepository.GetFinancing().Any(n => n.FinancingType == financing))
            {
                response.Success = false;
                response.Message = "ERROR: Financing Type Exists";
            }
            else
            {
                carsRepository.AddFinancing(financing);
                response.Success = true;
                response.Message = "Success";
            }
            return(response);
        }