Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/10/08 11:55:47 (15 years ago)
Author:
svonolfe
Message:

Implemented UserGroupAdapter (#372)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs

    r925 r936  
    133133      ClientInfo client = new ClientInfo();
    134134
    135       dsHiveServer.ClientRow row =
    136         data.Single<dsHiveServer.ClientRow>(
    137           r => !r.IsGUIDNull() && r.GUID == clientId);
     135      dsHiveServer.ClientRow row = null;
     136      IEnumerable<dsHiveServer.ClientRow> clients =
     137            from c in
     138              data.AsEnumerable<dsHiveServer.ClientRow>()
     139            where !c.IsGUIDNull() && c.GUID == clientId
     140            select c;
     141      if (clients.Count<dsHiveServer.ClientRow>() == 1)
     142        row = clients.First<dsHiveServer.ClientRow>();
    138143
    139144      if (row != null) {
     
    162167    public bool DeleteClient(ClientInfo client) {
    163168      if (client != null) {
    164         dsHiveServer.ClientRow row =
    165           data.Single<dsHiveServer.ClientRow>(
    166             r => r.GUID == client.ClientId);
     169        dsHiveServer.ClientRow row = null;
     170        IEnumerable<dsHiveServer.ClientRow> clients =
     171              from c in
     172                data.AsEnumerable<dsHiveServer.ClientRow>()
     173              where !c.IsGUIDNull() && c.GUID == client.ClientId
     174              select c;
     175        if (clients.Count<dsHiveServer.ClientRow>() == 1)
     176          row = clients.First<dsHiveServer.ClientRow>();
    167177
    168178        if (row != null) {
Note: See TracChangeset for help on using the changeset viewer.