Changeset 5402 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
- Timestamp:
- 01/31/11 18:15:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
r5375 r5402 67 67 target.JobState = source.JobState; 68 68 target.UserId = source.UserId; 69 // target.RequiredPlugins = db.Plugins.Select(x => source.PluginsNeededIds.Contains(x.PluginId)); - this is difficult69 // RequiredPlugins need to be added by Dao 70 70 } 71 71 } … … 109 109 public static DT.Plugin ToDto(Plugin source) { 110 110 if (source == null) return null; 111 return new DT.Plugin { Id = source.PluginId, Name = source.Name, Version = new Version(source.Version) };111 return new DT.Plugin { Id = source.PluginId, Name = source.Name, Version = new Version(source.Version), UserId = source.UserId, IsLocal = source.IsLocal, DateCreated = source.DateCreated }; 112 112 } 113 113 public static Plugin ToEntity(DT.Plugin source) { … … 118 118 public static void ToEntity(DT.Plugin source, Plugin target) { 119 119 if ((source != null) && (target != null)) { 120 target.PluginId = source.Id; target.Name = source.Name; target.Version = source.Version.ToString(); 120 target.PluginId = source.Id; target.Name = source.Name; target.Version = source.Version.ToString(); target.UserId = source.UserId; target.IsLocal = source.IsLocal; target.DateCreated = source.DateCreated; 121 121 } 122 122 } … … 126 126 public static DT.PluginData ToDto(PluginData source) { 127 127 if (source == null) return null; 128 return new DT.PluginData { PluginId = source.PluginId, Data = source.Data.ToArray(), FileName = source.FileName, PluginDataId = source.PluginDataId};128 return new DT.PluginData { Id = source.PluginDataId, PluginId = source.PluginId, Data = source.Data.ToArray(), FileName = source.FileName }; 129 129 } 130 130 public static PluginData ToEntity(DT.PluginData source) { … … 135 135 public static void ToEntity(DT.PluginData source, PluginData target) { 136 136 if ((source != null) && (target != null)) { 137 target.PluginId = source.PluginId; target.Data = new Binary(source.Data); 138 target.FileName = target.FileName; 137 target.PluginDataId = source.Id; target.PluginId = source.PluginId; target.Data = new Binary(source.Data); target.FileName = source.FileName; 139 138 } 140 139 }
Note: See TracChangeset
for help on using the changeset viewer.