Changeset 12691 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/JobDao.cs
- Timestamp:
- 07/08/15 15:51:32 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/JobDao.cs
r12468 r12691 29 29 30 30 public override Job GetById(Guid id) { 31 return Table.SingleOrDefault(x => x.JobId ==id);31 return GetByIdQuery(DataContext, id); 32 32 } 33 34 #region Compiled queries 35 private static readonly Func<DataContext, Guid, Job> GetByIdQuery = 36 CompiledQuery.Compile((DataContext db, Guid jobId) => 37 (from job in db.GetTable<Job>() 38 where job.JobId == jobId 39 select job).SingleOrDefault()); 40 #endregion 33 41 } 34 42 }
Note: See TracChangeset
for help on using the changeset viewer.