Пример #1
0
        public static void Main(string[] args)
        {
            //
            StartingDataClass startD = new StartingDataClass {
                ListValue = 9
            };

            LibraryE       lb  = new LibraryE();
            ClassForRelinq CFR = new ClassForRelinq();

            decimal ctp  = lb.Count();
            decimal ctp0 = CFR.ReCount();

            Console.WriteLine("Total count of first table: {0}", ctp);
            Console.WriteLine("Total count of secondary table: {0}", ctp0);
            //

            QueryResults();
            Console.WriteLine("\n");
            QueryResultsLymbda();
            Console.WriteLine("\n");
            ProtectionExample();
            ///////////////////////////////////////////////////////
            Console.ReadKey();
        }
Пример #2
0
        public static decimal ReCount(this ClassForRelinq CFR0)
        {
            decimal total0 = 0;

            foreach (StartingDataClass item in CFR0.TableRelinq)
            {
                total0 += item.ListValue;
            }
            return(total0);
        }