Ignore:
Timestamp:
01/17/18 15:24:44 (3 years ago)
Author:
jzenisek
Message:

#2839

  • updated TaskDao towards independency of the formerly used Task-Resource assignment entity
  • updated several permission/assignment handling service methods for client
  • added AssignedJobResource DTO
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Converter.cs

    r15411 r15628  
    143143    #endregion
    144144
     145    #region AssignedJobResource
     146    public static DT.AssignedJobResource ToDto(this DA.AssignedJobResource source) {
     147      if (source == null) return null;
     148      return new DT.AssignedJobResource {
     149        JobId = source.JobId,
     150        ResourceId = source.ResourceId
     151      };
     152    }
     153    public static DA.AssignedJobResource ToEntity(this DT.AssignedJobResource source) {
     154      if (source == null) return null;
     155      var result = new DA.AssignedJobResource();
     156      source.CopyToEntity(result);
     157      return result;
     158    }
     159    public static void CopyToEntity(this DT.AssignedJobResource source, DA.AssignedJobResource target) {
     160      if ((source == null) || (target == null)) return;
     161      target.JobId = source.JobId;
     162      target.ResourceId = source.ResourceId;
     163    }
     164    #endregion
     165
    145166    #region JobPermission
    146167    public static DT.JobPermission ToDto(this DA.JobPermission source) {
Note: See TracChangeset for help on using the changeset viewer.