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); }
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); }
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; }
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; }