Changeset 4467 for trunk/sources/HeuristicLab.Services.OKB/3.3/Convert.cs
- Timestamp:
- 09/22/10 05:55:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.OKB/3.3/Convert.cs
r4455 r4467 20 20 #endregion 21 21 22 using System.Data.Linq; 22 23 using DA = HeuristicLab.Services.OKB.DataAccess; 23 24 using DT = HeuristicLab.Services.OKB.DataTransfer; … … 60 61 } 61 62 #endregion 63 64 #region AlgorithmData 65 public static DT.AlgorithmData ToDto(DA.AlgorithmData source) { 66 return new DT.AlgorithmData { AlgorithmId = source.AlgorithmId, DataTypeId = source.DataTypeId, Data = source.Data.ToArray() }; 67 } 68 public static DA.AlgorithmData ToEntity(DT.AlgorithmData source) { 69 return new DA.AlgorithmData { AlgorithmId = source.AlgorithmId, DataTypeId = source.DataTypeId, Data = new Binary(source.Data) }; 70 } 71 public static void ToEntity(DT.AlgorithmData source, DA.AlgorithmData target) { 72 target.AlgorithmId = source.AlgorithmId; target.DataTypeId = source.DataTypeId; target.Data = new Binary(source.Data); 73 } 74 #endregion 75 76 #region DataType 77 public static DT.DataType ToDto(DA.DataType source) { 78 return new DT.DataType { Id = source.Id, Name = source.Name, SqlName = source.SqlName, PlatformId = source.PlatformId }; 79 } 80 public static DA.DataType ToEntity(DT.DataType source) { 81 return new DA.DataType { Id = source.Id, Name = source.Name, SqlName = source.SqlName, PlatformId = source.PlatformId }; 82 } 83 public static void ToEntity(DT.DataType source, DA.DataType target) { 84 target.Id = source.Id; target.Name = source.Name; target.SqlName = source.SqlName; target.PlatformId = source.PlatformId; 85 } 86 #endregion 62 87 } 63 88 }
Note: See TracChangeset
for help on using the changeset viewer.