示例#1
0
 private void UpdateEmployee(int employeeId, string userId)
 {
     using (SecureEmployeeCreatorDbContext db = new SecureEmployeeCreatorDbContext())
     {
         employeeId = db.UpdateEmployee(employeeId, userId);
     }
 }
示例#2
0
        private int CreateEmployee()
        {
            int employeeId = 0;

            try
            {
                using (SecureEmployeeCreatorDbContext db = new SecureEmployeeCreatorDbContext())
                {
                    employeeId = db.CreateEmployee();
                }
            }
            catch (Exception e)
            {
                throw new FailedDatabaseConnectionException("Cannot create employee");
            }
            return(employeeId);
        }