protected override void UpdateResult(object outerEntity, object innerResult) { global::LightSwitchApplication.Implementation.Permission outerPermission = outerEntity as global::LightSwitchApplication.Implementation.Permission; global::LsSecurityData.LsSecurityDataService.Permission innerPermission = innerResult as global::LsSecurityData.LsSecurityDataService.Permission; if ((outerPermission != null) && (innerPermission != null)) { outerPermission.Id = innerPermission.Id; outerPermission.Name = innerPermission.Name; return; } global::LightSwitchApplication.Implementation.RoleAssignment outerRoleAssignment = outerEntity as global::LightSwitchApplication.Implementation.RoleAssignment; global::LsSecurityData.LsSecurityDataService.RoleAssignment innerRoleAssignment = innerResult as global::LsSecurityData.LsSecurityDataService.RoleAssignment; if ((outerRoleAssignment != null) && (innerRoleAssignment != null)) { outerRoleAssignment.UserName = innerRoleAssignment.UserName; outerRoleAssignment.RoleName = innerRoleAssignment.RoleName; outerRoleAssignment.SourceAccountName = innerRoleAssignment.SourceAccountName; return; } global::LightSwitchApplication.Implementation.RolePermission outerRolePermission = outerEntity as global::LightSwitchApplication.Implementation.RolePermission; global::LsSecurityData.LsSecurityDataService.RolePermission innerRolePermission = innerResult as global::LsSecurityData.LsSecurityDataService.RolePermission; if ((outerRolePermission != null) && (innerRolePermission != null)) { outerRolePermission.RoleName = innerRolePermission.RoleName; outerRolePermission.PermissionId = innerRolePermission.PermissionId; return; } global::LightSwitchApplication.Implementation.Role outerRole = outerEntity as global::LightSwitchApplication.Implementation.Role; global::LsSecurityData.LsSecurityDataService.Role innerRole = innerResult as global::LsSecurityData.LsSecurityDataService.Role; if ((outerRole != null) && (innerRole != null)) { outerRole.Name = innerRole.Name; return; } global::LightSwitchApplication.Implementation.UserRegistration outerUserRegistration = outerEntity as global::LightSwitchApplication.Implementation.UserRegistration; global::LsSecurityData.LsSecurityDataService.UserRegistration innerUserRegistration = innerResult as global::LsSecurityData.LsSecurityDataService.UserRegistration; if ((outerUserRegistration != null) && (innerUserRegistration != null)) { outerUserRegistration.UserName = innerUserRegistration.UserName; outerUserRegistration.FullName = innerUserRegistration.FullName; outerUserRegistration.Password = innerUserRegistration.Password; return; } base.UpdateResult(outerEntity, innerResult); }
protected override object ConvertEntity(object outerEntity) { global::LightSwitchApplication.Implementation.Permission permission = outerEntity as global::LightSwitchApplication.Implementation.Permission; if (permission != null) { global::LsSecurityData.LsSecurityDataService.Permission result = new global::LsSecurityData.LsSecurityDataService.Permission(); result.Id = permission.Id; result.Name = permission.Name; return(result); } global::LightSwitchApplication.Implementation.RoleAssignment roleAssignment = outerEntity as global::LightSwitchApplication.Implementation.RoleAssignment; if (roleAssignment != null) { global::LsSecurityData.LsSecurityDataService.RoleAssignment result = new global::LsSecurityData.LsSecurityDataService.RoleAssignment(); result.UserName = roleAssignment.UserName; result.RoleName = roleAssignment.RoleName; result.SourceAccountName = roleAssignment.SourceAccountName; return(result); } global::LightSwitchApplication.Implementation.RolePermission rolePermission = outerEntity as global::LightSwitchApplication.Implementation.RolePermission; if (rolePermission != null) { global::LsSecurityData.LsSecurityDataService.RolePermission result = new global::LsSecurityData.LsSecurityDataService.RolePermission(); result.RoleName = rolePermission.RoleName; result.PermissionId = rolePermission.PermissionId; return(result); } global::LightSwitchApplication.Implementation.Role role = outerEntity as global::LightSwitchApplication.Implementation.Role; if (role != null) { global::LsSecurityData.LsSecurityDataService.Role result = new global::LsSecurityData.LsSecurityDataService.Role(); result.Name = role.Name; return(result); } global::LightSwitchApplication.Implementation.UserRegistration userRegistration = outerEntity as global::LightSwitchApplication.Implementation.UserRegistration; if (userRegistration != null) { global::LsSecurityData.LsSecurityDataService.UserRegistration result = new global::LsSecurityData.LsSecurityDataService.UserRegistration(); result.UserName = userRegistration.UserName; result.FullName = userRegistration.FullName; result.Password = userRegistration.Password; return(result); } return(null); }