Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/25/10 19:57:44 (14 years ago)
Author:
kgrading
Message:

improved the DAL further, changed minor details for the presentation (#830)

Location:
trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ClientGroupDao.cs

    r3203 r3220  
    153153      return target;
    154154    }
     155
     156    public IEnumerable<ClientGroupDto> FindByName(string res) {
     157      return (from cq in Context.ClientGroups
     158              where cq.Resource.Name == res
     159              select EntityToDto(cq, null)).ToList();     
     160    }
     161
     162
    155163  }
    156164}
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ContextFactory.cs

    r3011 r3220  
    33using System.Linq;
    44using System.Text;
     5using System.Data.Common;
     6using System.Data.SqlClient;
    57
    68namespace HeuristicLab.Hive.Server.LINQDataAccess {
     
    810    [ThreadStatic]
    911    private static HiveDataContext _hiveDataContext;
     12
     13    [ThreadStatic]
     14    private static SqlTransaction _currentTransaction;
    1015
    1116    public static HiveDataContext Context {
     
    1520        return _hiveDataContext;       
    1621      }
    17       set {
     22      set {       
    1823        _hiveDataContext = value;
    1924      }
    2025    }
     26
     27    public static SqlTransaction CurrentTransaction {
     28      get {
     29        return _currentTransaction;
     30      } set {
     31        _currentTransaction = value;
     32      }
     33    }
    2134  }
    2235}
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/HeuristicLab.Hive.Server.LINQDataAccess-3.2.csproj

    r3022 r3220  
    106106    </Compile>
    107107    <Compile Include="UptimeCalendarDao.cs" />
     108    <Compile Include="VarBinaryStream.cs" />
    108109  </ItemGroup>
    109110  <ItemGroup>
  • trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/JobDao.cs

    r3018 r3220  
    6060      Job job = Context.Jobs.SingleOrDefault(j => j.JobId.Equals(bObj.Id));
    6161      DtoToEntity(bObj, job);
    62       Context.SubmitChanges();
     62      try {
     63        Context.SubmitChanges();
     64      } catch (ChangeConflictException cfe) {
     65       
     66      }
    6367    }
    6468
     
    112116
    113117    public Stream GetSerializedJobStream(Guid jobId) {
    114       HiveDataContext hdc = new HiveDataContext();
    115       String ConnStr = hdc.Connection.ConnectionString;
    116       SqlConnection connection = new SqlConnection(hdc.Connection.ConnectionString);     
    117118      VarBinarySource source =
    118119        new VarBinarySource(
    119           connection, null,
     120          (SqlConnection)Context.Connection, null,
    120121          "Job", "SerializedJob", "JobId", jobId);
    121122
Note: See TracChangeset for help on using the changeset viewer.