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

            var dto = new locationDto();

            dto.v_LocationId     = entity.v_LocationId;
            dto.v_OrganizationId = entity.v_OrganizationId;
            dto.v_Name           = entity.v_Name;
            dto.i_IsDeleted      = entity.i_IsDeleted;
            dto.i_InsertUserId   = entity.i_InsertUserId;
            dto.d_InsertDate     = entity.d_InsertDate;
            dto.i_UpdateUserId   = entity.i_UpdateUserId;
            dto.d_UpdateDate     = entity.d_UpdateDate;

            entity.OnDTO(dto);

            return(dto);
        }