Changeset 5679
- Timestamp:
- 03/15/11 02:04:07 (14 years ago)
- Location:
- branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration
- Files:
-
- 2 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()) { -
branches/OKB (trunk integration)/HeuristicLab.Services.OKB/3.3/Administration/IAdministrationService.cs
r5482 r5679 34 34 #region Platform Methods 35 35 [OperationContract] 36 Platform GetPlatform(long id); 37 [OperationContract] 36 38 IEnumerable<Platform> GetPlatforms(); 37 39 [OperationContract] … … 45 47 #region AlgorithmClass Methods 46 48 [OperationContract] 49 AlgorithmClass GetAlgorithmClass(long id); 50 [OperationContract] 47 51 IEnumerable<AlgorithmClass> GetAlgorithmClasses(); 48 52 [OperationContract] … … 55 59 56 60 #region Algorithm Methods 61 [OperationContract] 62 Algorithm GetAlgorithm(long id); 57 63 [OperationContract] 58 64 IEnumerable<Algorithm> GetAlgorithms(); … … 75 81 #region ProblemClass Methods 76 82 [OperationContract] 83 ProblemClass GetProblemClass(long id); 84 [OperationContract] 77 85 IEnumerable<ProblemClass> GetProblemClasses(); 78 86 [OperationContract] … … 85 93 86 94 #region Problem Methods 95 [OperationContract] 96 Problem GetProblem(long id); 87 97 [OperationContract] 88 98 IEnumerable<Problem> GetProblems();
Note: See TracChangeset
for help on using the changeset viewer.