Esempio n. 1
0
        static void ProvideEmployee(EmployeeContext context)
        {
            var provider = new EmployeeProvider(context);

            Console.WriteLine(provider.Get(2).FirstName);
            Console.ReadLine();
        }
Esempio n. 2
0
        static void DeleteEmployee(EmployeeContext context, int id)
        {
            var provider = new EmployeeProvider(context);
            var employee = provider.Get(id);
            var remover  = new EmployeeRemover(context);

            remover.Remove(employee);
        }
Esempio n. 3
0
        static void UpdateEmployee(EmployeeContext context, int id)
        {
            var provider = new EmployeeProvider(context);
            var employee = provider.Get(id);
            var editor   = new EmployeeEditor(context);

            employee.Address = "Gondor";
            editor.Edit(employee);
            Console.ReadLine();
        }