<commit_before>// Copyright Naked Objects Group Ltd, 45 Station Road, <NAME> Thames, UK, RG9 1AT
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.

using System.Linq;
using NakedFunctions;
using AW.Types;
using static AW.Helpers;
using System;

namespace AW.Types {
    public enum Ordering
    {
        Ascending,
        Descending
    };
}


namespace AW.Functions {
    

    [Named("Orders")]
    public static class Order_MenuFunctions  {

        [ MemberOrder(99)]
        public static SalesOrderHeader RandomOrder(IContext context) => Random<SalesOrderHeader>(context);

        [ MemberOrder(5)]
        [TableView(true, "OrderDate", "DueDate")]
        public static IQueryable<SalesOrderHeader> OrdersInProcess(IContext context) =>
            context.Instances<SalesOrderHeader>().Where(x => x.StatusByte == 1);
       
        [MemberOrder(10)]
        public static SalesOrderHeader FindOrder([DefaultValue("SO")] string orderNumber, IContext context) =>
         context.Instances<SalesOrderHeader>().Where(x => x.SalesOrderNumber == orderNumber).FirstOrDefault();

        [MemberOrder(90)]
        [TableView(true, "TotalDue", "Customer", "OrderDate", "SalesPerson", "Comment")]
        public static IQueryable<SalesOrderHeader> HighestValueOrders(IContext context) =>
          context.Instances<SalesOrderHeader>().OrderByDescending(obj => obj.TotalDue);

 <commit_msg>Update Order_MenuFunctions.cs<commit_after>// Copyright Naked Objects Group Ltd, 45 Station Road, <NAME> Thames, UK, RG9 1AT
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.

using System.Linq;
using NakedFunctions;
using AW.Types;
using static AW.Helpers;
using System;

namespace AW.Types {
    public enum Ordering
    {
        Ascending,
        Descending
    };
}


namespace AW.Functions {
    

    [Named("Orders")]
    public static class Order_MenuFunctions  {

        [ MemberOrder(99)]
        public static SalesOrderHeader RandomOrder(IContext context) => Random<SalesOrderHeader>(context);

        [ MemberOrder(5)]
        [TableView(true, "OrderDate", "DueDate")]
        public static IQueryable<SalesOrderHeader> OrdersInProcess(IContext context) =>
            context.Instances<SalesOrderHeader>().Where(x => x.StatusByte == 1);
       
        [MemberOrder(10)]
        public static SalesOrderHeader FindOrder([DefaultValue("SO")] string orderNumber, IContext context) =>
         context.Instances<SalesOrderHeader>().Where(x => x.SalesOrderNumber == orderNumber).FirstOrDefault();

        [MemberOrder(90)]
        [TableView(true, "TotalDue", "Customer", "OrderDate", "SalesPerson", "Comment")]
        public static IQueryable<SalesOrderHeader> HighestValueOrders(IContext context) =>
          context.Instances<SalesOrderHeader>().OrderByDescending(obj => obj.TotalDue);

        [MemberOrder(91)]
        [TableView(true, "OrderDate", "Customer")]
        public static IQueryable<SalesOrderHeader> OrdersByStatus(IContext context, OrderStatus status) =>
          context.Instances<SalesOrderHeader>().Where(x => x.StatusByte == (byte) status).OrderByDescending(obj => obj.OrderDate);

{'fraction_non_alphanumeric': 0.10381978452497552, 'fraction_numerical': 0.00832517140058766, 'mean_word_length': 3.7889800703399765, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6719532', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1058, 'n_words': 341}