/// <summary>
        /// Converts this instance of <see cref="movementdetail"/> to an instance of <see cref="movementdetailDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="movementdetail"/> to convert.</param>
        public static movementdetailDto ToDTO(this movementdetail entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new movementdetailDto();

            dto.v_MovementId     = entity.v_MovementId;
            dto.v_ProductId      = entity.v_ProductId;
            dto.v_WarehouseId    = entity.v_WarehouseId;
            dto.r_StockMax       = entity.r_StockMax;
            dto.r_StockMin       = entity.r_StockMin;
            dto.i_MovementTypeId = entity.i_MovementTypeId;
            dto.r_Quantity       = entity.r_Quantity;
            dto.r_Price          = entity.r_Price;
            dto.r_SubTotal       = entity.r_SubTotal;
            dto.d_UpdateDate     = entity.d_UpdateDate;

            entity.OnDTO(dto);

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="movementdetailDto"/> to an instance of <see cref="movementdetail"/>.
        /// </summary>
        /// <param name="dto"><see cref="movementdetailDto"/> to convert.</param>
        public static movementdetail ToEntity(this movementdetailDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new movementdetail();

            entity.v_MovementId     = dto.v_MovementId;
            entity.v_ProductId      = dto.v_ProductId;
            entity.v_WarehouseId    = dto.v_WarehouseId;
            entity.r_StockMax       = dto.r_StockMax;
            entity.r_StockMin       = dto.r_StockMin;
            entity.i_MovementTypeId = dto.i_MovementTypeId;
            entity.r_Quantity       = dto.r_Quantity;
            entity.r_Price          = dto.r_Price;
            entity.r_SubTotal       = dto.r_SubTotal;
            entity.d_UpdateDate     = dto.d_UpdateDate;

            dto.OnEntity(entity);

            return(entity);
        }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="movementdetail"/> converted from <see cref="movementdetailDto"/>.</param>
 static partial void OnEntity(this movementdetailDto dto, movementdetail entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="movementdetailDto"/> converted from <see cref="movementdetail"/>.</param>
 static partial void OnDTO(this movementdetail entity, movementdetailDto dto);