Exemplo n.º 1
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
            });
        }
 public EmployeeController(INorthWindTransactionalUnitOfWork unitOfWork)
 {
     this.unitOfWork      = unitOfWork;
     employeeTransactions = new EmployeeTransactions(unitOfWork);
 }