Example #1
0
        //dang ky
        public void dangky(CustomerDto customer, UserDto user)
        {
            var customers = customer.ConvertToCustomer();
            var users     = user.ConvertToUser();

            _unitOfWork.Customers.Add(customers);
            _unitOfWork.Complete();

            users.UserCustomerId   = customers.CustomerId;
            users.UserPermissionId = 1;


            _unitOfWork.Users.Add(users);
            _unitOfWork.Complete();
        }