Ejemplo n.º 1
0
        public BusinessUserMapDTO Update(BusinessUserMapDTO oBusinessUserMapDTO)
        {
            BusinessUserMapDTO returnUserMap = null;
            if (oBusinessUserMapDTO != null && oBusinessUserMapDTO.BusinessUserMapID > 0)
            {
                oBusinessUserMapRepos.UpdateBusinessUserMap(0, BusinessUserMapAssembler.ToEntity(oBusinessUserMapDTO));
                returnUserMap = oBusinessUserMapDTO;
            }

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

            var dto = new BusinessUserMapDTO();

            dto.BusinessUserMapID = entity.BusinessUserMapID;
            dto.BusinessID = entity.BusinessID;
            dto.UserID = entity.UserID;
            dto.IsOwner = entity.IsOwner;
            dto.BusinessUserTypeID = entity.BusinessUserTypeID;

            entity.OnDTO(dto);

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