Changeset 12691 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimJobDao.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/HiveStatistics/DimJobDao.cs
r12516 r12691 29 29 30 30 public override DimJob GetById(Guid id) { 31 return Table.SingleOrDefault(x => x.JobId ==id);31 return GetByIdQuery(DataContext, id); 32 32 } 33 33 … … 43 43 return Table.Where(x => x.DateCompleted != null); 44 44 } 45 46 #region Compiled queries 47 private static readonly Func<DataContext, Guid, DimJob> GetByIdQuery = 48 CompiledQuery.Compile((DataContext db, Guid id) => 49 (from dimJob in db.GetTable<DimJob>() 50 where dimJob.JobId == id 51 select dimJob).SingleOrDefault()); 52 #endregion 45 53 } 46 54 }
Note: See TracChangeset
for help on using the changeset viewer.