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

            var entity = new product();

            entity.v_ProductId             = dto.v_ProductId;
            entity.i_CategoryId            = dto.i_CategoryId;
            entity.v_Name                  = dto.v_Name;
            entity.v_GenericName           = dto.v_GenericName;
            entity.v_BarCode               = dto.v_BarCode;
            entity.v_ProductCode           = dto.v_ProductCode;
            entity.v_Brand                 = dto.v_Brand;
            entity.v_Model                 = dto.v_Model;
            entity.v_SerialNumber          = dto.v_SerialNumber;
            entity.d_ExpirationDate        = dto.d_ExpirationDate;
            entity.i_MeasurementUnitId     = dto.i_MeasurementUnitId;
            entity.r_ReferentialCostPrice  = dto.r_ReferentialCostPrice;
            entity.r_ReferentialSalesPrice = dto.r_ReferentialSalesPrice;
            entity.v_Presentation          = dto.v_Presentation;
            entity.v_AdditionalInformation = dto.v_AdditionalInformation;
            entity.b_Image                 = dto.b_Image;
            entity.i_IsDeleted             = dto.i_IsDeleted;
            entity.i_InsertUserId          = dto.i_InsertUserId;
            entity.d_InsertDate            = dto.d_InsertDate;
            entity.i_UpdateUserId          = dto.i_UpdateUserId;
            entity.d_UpdateDate            = dto.d_UpdateDate;

            dto.OnEntity(entity);

            return(entity);
        }