Changeset 5679 for branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/AdministrationService.cs
- Timestamp:
- 03/15/11 02:04:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/AdministrationService.cs
r5534 r5679 33 33 public class AdministrationService : IAdministrationService { 34 34 #region Platform Methods 35 public DataTransfer.Platform GetPlatform(long id) { 36 using (OKBDataContext okb = new OKBDataContext()) { 37 return Convert.ToDto(okb.Platforms.FirstOrDefault(x => x.Id == id)); 38 } 39 } 35 40 public IEnumerable<DataTransfer.Platform> GetPlatforms() { 36 41 using (OKBDataContext okb = new OKBDataContext()) { … … 63 68 64 69 #region AlgorithmClass Methods 70 public DataTransfer.AlgorithmClass GetAlgorithmClass(long id) { 71 using (OKBDataContext okb = new OKBDataContext()) { 72 return Convert.ToDto(okb.AlgorithmClasses.FirstOrDefault(x => x.Id == id)); 73 } 74 } 65 75 public IEnumerable<DataTransfer.AlgorithmClass> GetAlgorithmClasses() { 66 76 using (OKBDataContext okb = new OKBDataContext()) { … … 93 103 94 104 #region Algorithm Methods 105 public DataTransfer.Algorithm GetAlgorithm(long id) { 106 using (OKBDataContext okb = new OKBDataContext()) { 107 return Convert.ToDto(okb.Algorithms.FirstOrDefault(x => x.Id == id)); 108 } 109 } 95 110 public IEnumerable<DataTransfer.Algorithm> GetAlgorithms() { 96 111 using (OKBDataContext okb = new OKBDataContext()) { … … 150 165 151 166 #region ProblemClass Methods 167 public DataTransfer.ProblemClass GetProblemClass(long id) { 168 using (OKBDataContext okb = new OKBDataContext()) { 169 return Convert.ToDto(okb.ProblemClasses.FirstOrDefault(x => x.Id == id)); 170 } 171 } 152 172 public IEnumerable<DataTransfer.ProblemClass> GetProblemClasses() { 153 173 using (OKBDataContext okb = new OKBDataContext()) { … … 180 200 181 201 #region Problem Methods 202 public DataTransfer.Problem GetProblem(long id) { 203 using (OKBDataContext okb = new OKBDataContext()) { 204 return Convert.ToDto(okb.Problems.FirstOrDefault(x => x.Id == id)); 205 } 206 } 182 207 public IEnumerable<DataTransfer.Problem> GetProblems() { 183 208 using (OKBDataContext okb = new OKBDataContext()) {
Note: See TracChangeset
for help on using the changeset viewer.