Ejemplo n.º 1
0
        static void SetEmployeeName(int id, string fullName, IEmployeeDataSource dataSource)
        {
            EmployeeInfo employeeInfo = dataSource.GetEmployeeInfo(id);

            employeeInfo.FullName = fullName;
            dataSource.SetEmployeeInfo(employeeInfo);
        }
Ejemplo n.º 2
0
        static void SetEmployeeName(int id, string firstName, IEmployeeDataSource dataSource)
        {
            EmployeeInfo info = dataSource.GetEmployeeInfo(id);

            info.FirstName = firstName;
            dataSource.SetEmployeeInfo(info);
        }
Ejemplo n.º 3
0
        public void SetEmployeeInfo(EmployeeInfo employieInfo)
        {
            _dataSource.SetEmployeeInfo(employieInfo);

            EmployeeDataSourceProxy._cache.AddOrUpdate(employieInfo.Id,
                                                       employieInfo, (key, value) => employieInfo);
        }
 public void SetEmployeeInfo(EmployeeInfo info)
 {
     _dataSource.SetEmployeeInfo(info);
     _cache.AddOrUpdate(info.Id, info, (id, emp) => info);
 }