public IEnumerable <OrderDTO> GetAllOrder() { IEnumerable <Order> orders = Database.Orders.GetAll(); List <OrderDTO> orderResult = new List <OrderDTO>(); foreach (var order in orders) { orderResult.Add(MyMapper.OrderToOrderDTO(order)); } return(orderResult); }