Exemplo n.º 1
0
        /// <summary>
        /// Converts this instance of <see cref="tblLogin"/> to an instance of <see cref="tblLoginDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="tblLogin"/> to convert.</param>
        public static tblLoginDTO ToDTO(this tblLogin entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new tblLoginDTO();

            dto.LoginId   = entity.LoginId;
            dto.LoginName = entity.LoginName;
            dto.Password  = entity.Password;

            entity.OnDTO(dto);

            return(dto);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="tblLoginDTO"/> to an instance of <see cref="tblLogin"/>.
        /// </summary>
        /// <param name="dto"><see cref="tblLoginDTO"/> to convert.</param>
        public static tblLogin ToEntity(this tblLoginDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new tblLogin();

            entity.LoginId   = dto.LoginId;
            entity.LoginName = dto.LoginName;
            entity.Password  = dto.Password;

            dto.OnEntity(entity);

            return(entity);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="tblLogin"/> converted from <see cref="tblLoginDTO"/>.</param>
 static partial void OnEntity(this tblLoginDTO dto, tblLogin entity);
Exemplo n.º 4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="tblLoginDTO"/> converted from <see cref="tblLogin"/>.</param>
 static partial void OnDTO(this tblLogin entity, tblLoginDTO dto);