/// <summary> /// Converts this instance of <see cref="agreements"/> to an instance of <see cref="agreementsDTO"/>. /// </summary> /// <param name="entity"><see cref="agreements"/> to convert.</param> public static agreementsDTO ToDTO(this agreements entity) { if (entity == null) { return(null); } var dto = new agreementsDTO(); dto.id_act = entity.id_act; dto.name = entity.name; dto.description = entity.description; dto.id_user_responsible = entity.id_user_responsible; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="agreementsDTO"/> to an instance of <see cref="agreements"/>. /// </summary> /// <param name="dto"><see cref="agreementsDTO"/> to convert.</param> public static agreements ToEntity(this agreementsDTO dto) { if (dto == null) { return(null); } var entity = new agreements(); entity.id_act = dto.id_act; entity.name = dto.name; entity.description = dto.description; entity.id_user_responsible = dto.id_user_responsible; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="agreements"/> converted from <see cref="agreementsDTO"/>.</param> static partial void OnEntity(this agreementsDTO dto, agreements entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="agreementsDTO"/> converted from <see cref="agreements"/>.</param> static partial void OnDTO(this agreements entity, agreementsDTO dto);