コード例 #1
0
        public Response Buy(Invoice invoice)
        {
            Response response = new Response();

            if (invoice.Email == null && invoice.InvoiceName == null)
            {
                response.Success = false;
                response.Message = "ERROR: invoice must have email or name";
                return(response);
            }
            carsRepository.AddInvoice(invoice);
            response.Success = true;
            response.Message = "invoice added";
            return(response);
        }