Exemplo n.º 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();
        }
Exemplo n.º 2
0
        public static decimal Count(this LibraryE LE)
        {
            decimal total = 0m;

            foreach (ForEnumTable fett in LE.Table)
            {
                total += fett.Value;
            }
            return(total);
        }