コード例 #1
0
        public SalesOrderDataObjectList GetSalesOrdersForUser(Guid userID)
        {
            var user        = _userRepository.GetByKey(userID);
            var salesOrders = _salesOrderRepository.FindSalesOrdersByUser(user);
            var salesOrderDataObjectList = new SalesOrderDataObjectList();

            salesOrderDataObjectList.AddRange(salesOrders.Select(Mapper.Map <SalesOrder, SalesOrderDataObject>));
            return(salesOrderDataObjectList);
        }
コード例 #2
0
        public SalesOrderDataObjectList GetSalesOrders(string userName)
        {
            User user        = _userRepository.GetUserByName(userName);
            var  salesOrders = user.SalesOrders;
            var  result      = new SalesOrderDataObjectList();

            if (salesOrders != null)
            {
                result.AddRange(salesOrders.Select(Mapper.Map <SalesOrder, SalesOrderDataObject>));
            }
            return(result);
        }
コード例 #3
0
 public SalesOrderDataObjectList GetSalesOrdersForUser(Guid userID)
 {
     var user = _userRepository.GetByKey(userID);
     var salesOrders = _salesOrderRepository.FindSalesOrdersByUser(user);
     var salesOrderDataObjectList = new SalesOrderDataObjectList();
     salesOrderDataObjectList.AddRange(salesOrders.Select(Mapper.Map<SalesOrder, SalesOrderDataObject>));
     return salesOrderDataObjectList;
 }
コード例 #4
0
 public SalesOrderDataObjectList GetSalesOrders(string userName)
 {
     User user = _userRepository.GetUserByName(userName);
     var salesOrders = user.SalesOrders;
     var result = new SalesOrderDataObjectList();
     if (salesOrders != null)
     {
         result.AddRange(salesOrders.Select(Mapper.Map<SalesOrder, SalesOrderDataObject>));
     }
     return result;
 }