- Timestamp:
- 07/03/12 16:46:35 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:mergeinfo changed
/trunk/sources merged: 8084,8088-8090,8092-8100,8102-8113,8115,8117-8132,8134-8146,8148-8156,8158-8160,8163-8170,8173-8176,8178-8190,8192-8205
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.Services.Access/3.3/AccessService.cs
r8040 r8206 744 744 var g = group; //linq does not like vars called group 745 745 746 using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) { 747 var query = from ug in context.UserGroupBases.OfType<DA.UserGroup>() 748 where ug.Id == g.Id 749 select ug; 750 if (query.Count() > 0) { 751 context.UserGroupBases.DeleteOnSubmit(query.First()); 752 context.SubmitChanges(); 753 } else { 754 throw new Exception("UserGroup with id " + g.Id + " does not exist."); 746 if (g.Id != null && g.Id != Guid.Empty) { 747 using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) { 748 var query = from ug in context.UserGroupBases.OfType<DA.UserGroup>() 749 where ug.Id == g.Id 750 select ug; 751 if (query.Count() > 0) { 752 context.UserGroupBases.DeleteOnSubmit(query.First()); 753 context.SubmitChanges(); 754 } else { 755 throw new Exception("UserGroup with id " + g.Id + " does not exist."); 756 } 755 757 } 756 758 }
Note: See TracChangeset
for help on using the changeset viewer.