- Timestamp:
- 11/06/10 09:56:39 (14 years ago)
- Location:
- branches/UserManagement/HeuristicLab.Services.Authentication
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UserManagement/HeuristicLab.Services.Authentication/AuthenticationService.cs
r4647 r4726 26 26 where item.UserId == id 27 27 select item; 28 User user = Convert.ToDataTransfer((aspnet_User)User.Single()); 28 aspnet_User eUser = User.Single(); 29 30 User user = Convert.ToDataTransfer((aspnet_User)eUser); 29 31 30 32 if (user == null) { return null; } 31 33 32 Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();33 34 var Membership = from item in MembershipTable35 where item.UserId == id36 select item;37 38 Membership membership = Convert.ToDataTransfer((aspnet_Membership) Membership.Single());34 //Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>(); 35 36 //var Membership = from item in MembershipTable 37 // where item.UserId == id 38 // select item; 39 40 Membership membership = Convert.ToDataTransfer((aspnet_Membership)eUser.aspnet_Membership); 39 41 40 42 if (membership == null) { return null; } … … 112 114 if (user== null) { return null; } 113 115 114 Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();115 116 var Membership = from item in MembershipTable117 where item.UserId == user.UserId118 select item;119 120 Membership membership = Convert.ToDataTransfer((aspnet_Membership) Membership.Single());116 //Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>(); 117 118 //var Membership = from item in MembershipTable 119 // where item.UserId == user.UserId 120 // select item; 121 122 Membership membership = Convert.ToDataTransfer((aspnet_Membership)eUser.aspnet_Membership); 121 123 122 124 if (membership == null) { return null; } … … 456 458 Role role = GetRole(id); 457 459 458 bool deleteOnlyIfRoleIsEmpty = true;460 bool deleteOnlyIfRoleIsEmpty = false; 459 461 if (role == null) 460 462 { … … 716 718 } 717 719 720 public IEnumerable<DataTransfer.Application> GetApplications() 721 { 722 List<DataTransfer.Application> ApplicationList = new List<DataTransfer.Application>(); 723 using (UserManagementDataContext db = new UserManagementDataContext()) 724 { 725 try 726 { 727 Table<aspnet_Application> ApplicationTable = db.GetTable<aspnet_Application>(); 728 var Applications = from item in ApplicationTable 729 select item; 730 foreach (var eApplication in Applications) 731 { 732 733 Application application = Convert.ToDataTransfer(eApplication); 734 735 if (application == null) { return null; } 736 737 738 ApplicationList.Add(application); 739 } 740 } 741 catch (Exception ex) 742 { 743 Debug.WriteLine(ex.InnerException); 744 return new List<Application>(); 745 } 746 } 747 748 return ApplicationList; 749 } 750 751 752 718 753 #endregion 719 754 -
branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs
r4647 r4726 82 82 [OperationContract] 83 83 bool DeleteApplication(Application application); 84 85 [OperationContract] 86 IEnumerable<DataTransfer.Application> GetApplications(); 87 84 88 #endregion 85 89
Note: See TracChangeset
for help on using the changeset viewer.