Exemplo n.º 1
0
 public ProjectEnvironmentMapDTO UpdateMap(string id, ProjectEnvironmentMapDTO instance)
 {
     int mapId = Int32.Parse(id);
     instance.MapId = mapId;
     return ProjectEnvironmentMap.Update(mapId, instance).ToDTO();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Invoked when <see cref="ToDTO"/> operation is about to return.
        /// </summary>
        /// <param name="dto"><see cref="ProductEnvironmentMapDTO"/> converted from <see cref="ProductEnvironmentMap"/>.</param>
partial         static void OnDTO(this ProjectEnvironmentMap entity, ProjectEnvironmentMapDTO dto);
Exemplo n.º 3
0
 public ProjectEnvironmentMapDTO CreateMap(ProjectEnvironmentMapDTO instance)
 {
     return ProjectEnvironmentMap.Add(instance.ToEntity()).ToDTO();
 }
Exemplo n.º 4
0
        /// <summary>
        /// Converts this instance of <see cref="ProductEnvironmentMap"/> to an instance of <see cref="ProductEnvironmentMapDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="ProductEnvironmentMap"/> to convert.</param>
        public static ProjectEnvironmentMapDTO ToDTO(this ProjectEnvironmentMap entity)
        {
            if (entity == null) return null;

            var dto = new ProjectEnvironmentMapDTO();

            dto.MapId = entity.MapId;
            dto.ProjectId = entity.ProjectId;
            dto.EnvironmentId = entity.EnvironmentId;

            entity.OnDTO(dto);

            return dto;
        }