Example #1
0
        static void ShowEmployee(int id, IEmployeeDataSource dataSource)
        {
            EmployeeInfo info = dataSource.GetEmployee(id);

            Console.WriteLine("Id = {0}", info.Id);
            Console.WriteLine("Name = {0}", info.Name);
        }
Example #2
0
        static void SaveEmployee(int id, string name, IEmployeeDataSource dataSource)
        {
            EmployeeInfo info = dataSource.GetEmployee(id);

            info.Id   = id;
            info.Name = name;
            dataSource.SaveEmployee(info);
        }