Beispiel #1
0
        public IEnumerable <OrderItemData> GetAll(OrderHeaderData order)
        {
            Log.LogInformation("Accessing OrderItemRepo GetAll by InvoiceData function");
            var pcol = new List <SqlParameter>()
            {
                Mapper.BuildParam("@order_key", order.OrderKey)
            };

            using (entityContext) return(MapRows(entityContext.ExecuteProcedureAsSqlDataReader("usp_order_item_all", pcol)));
        }
        } // Map function closer

        public List <SqlParameter> MapParamsForUpsert(OrderHeaderData entity) => new List <SqlParameter>
        {
            new SqlParameter("@order_key", entity.OrderKey),
            new SqlParameter("@account_key", entity.AccountKey),
            new SqlParameter("@account_contact_key", entity.AccountContactKey),
            new SqlParameter("@order_num", entity.OrderNum),
            new SqlParameter("@order_entry_date", entity.OrderEntryDate),
            new SqlParameter("@order_status_key", entity.OrderStatusKey),
            new SqlParameter("@order_status_date", entity.OrderStatusDate),
            new SqlParameter("@order_ship_date", entity.OrderShipDate),
            new SqlParameter("@account_rep_key", entity.AccountRepKey),
            new SqlParameter("@order_complete_date", entity.OrderCompleteDate),
            new SqlParameter("@order_value_sum", entity.OrderValueSum),
            new SqlParameter("@order_item_count", entity.OrderItemCount),
            new SqlParameter("@deliver_by_date", entity.DeliverByDate),
            new SqlParameter("@sales_rep_key", entity.SalesRepKey),
            GetOutParam()
        };
 public List <SqlParameter> MapParamsForDelete(OrderHeaderData entity) => MapParamsForDelete(entity.OrderKey);