Changeset 3220 for trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess
- Timestamp:
- 03/25/10 19:57:44 (14 years ago)
- 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 153 153 return target; 154 154 } 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 155 163 } 156 164 } -
trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ContextFactory.cs
r3011 r3220 3 3 using System.Linq; 4 4 using System.Text; 5 using System.Data.Common; 6 using System.Data.SqlClient; 5 7 6 8 namespace HeuristicLab.Hive.Server.LINQDataAccess { … … 8 10 [ThreadStatic] 9 11 private static HiveDataContext _hiveDataContext; 12 13 [ThreadStatic] 14 private static SqlTransaction _currentTransaction; 10 15 11 16 public static HiveDataContext Context { … … 15 20 return _hiveDataContext; 16 21 } 17 set { 22 set { 18 23 _hiveDataContext = value; 19 24 } 20 25 } 26 27 public static SqlTransaction CurrentTransaction { 28 get { 29 return _currentTransaction; 30 } set { 31 _currentTransaction = value; 32 } 33 } 21 34 } 22 35 } -
trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/HeuristicLab.Hive.Server.LINQDataAccess-3.2.csproj
r3022 r3220 106 106 </Compile> 107 107 <Compile Include="UptimeCalendarDao.cs" /> 108 <Compile Include="VarBinaryStream.cs" /> 108 109 </ItemGroup> 109 110 <ItemGroup> -
trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/JobDao.cs
r3018 r3220 60 60 Job job = Context.Jobs.SingleOrDefault(j => j.JobId.Equals(bObj.Id)); 61 61 DtoToEntity(bObj, job); 62 Context.SubmitChanges(); 62 try { 63 Context.SubmitChanges(); 64 } catch (ChangeConflictException cfe) { 65 66 } 63 67 } 64 68 … … 112 116 113 117 public Stream GetSerializedJobStream(Guid jobId) { 114 HiveDataContext hdc = new HiveDataContext();115 String ConnStr = hdc.Connection.ConnectionString;116 SqlConnection connection = new SqlConnection(hdc.Connection.ConnectionString);117 118 VarBinarySource source = 118 119 new VarBinarySource( 119 connection, null,120 (SqlConnection)Context.Connection, null, 120 121 "Job", "SerializedJob", "JobId", jobId); 121 122
Note: See TracChangeset
for help on using the changeset viewer.