public IActionResult GetCustomerOrderDetail(CustomerOrderDetailRequest request, [FromHeader] object obj)
        {
            //try {
            //    credentialValidator.CheckCredentials(this.Request.Headers);
            //}
            //catch (Exception ex) {
            //    Services.Create<ILog>().LogFormat("Unauthorized request.Exception:{0}", LogLevel.Warning, ex);
            //    return Unauthorized();
            //}

            CustomerOrderDetailResponse response = orderOperations.GetCustomerOrderDetails(request);

            if (response == null)
            {
                return(NotFound());
            }
            return(new JsonResult(response));
        }
Exemple #2
0
        public void BllTest()
        {
            DefaultServices.RegisterDefaultServices();
            EmployeeTransactions employeeTransactions = new EmployeeTransactions(northWindUnitOfWork);
            EmployeeRequest      employeeRequest      = new EmployeeRequest()
            {
                EmployeeDto = new EmployeeDto()
                {
                    EmployeeId      = 0,
                    LastName        = "Emrah",
                    FirstName       = "Dinçadam",
                    Title           = "Emrah Dinçadam",
                    TitleOfCourtesy = "ED",
                    BirthDate       = new DateTime(1986, 07, 14),
                    HireDate        = new DateTime(2018, 01, 15),
                    Address         = "Sanayi Mahallesi, Teknopark Bulvarı 1/3C Kurtköy - Pendik",
                    City            = "İstanbul",
                    Region          = "Anadolu",
                    PostalCode      = "34906",
                    Country         = "Türkiye",
                    HomePhone       = "+90 216 664 20 00",
                    Extension       = "",
                    Photo           = null,
                    Notes           = "Developer",
                    ReportsTo       = null,
                    PhotoPath       = ""
                }
            };

            EmployeeResponse response = TransactionProcessor <NorthWindContext> .Execute
                                        (
                employeeTransactions.InsertEmployee,
                employeeRequest,
                northWindUnitOfWork
                                        );

            OrderOperations orderOperations     = new OrderOperations(northWindUnitOfWork);
            var             customerOrderDetail = orderOperations.GetCustomerOrderDetails(new CustomerOrderDetailRequest()
            {
                CustomerId = 1
            });
        }