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

            var entity = new DEPARTAMENTOS();

            entity.Id             = dto.Id;
            entity.Descripcion    = dto.Descripcion;
            entity.Fecha_Creacion = DateTime.Now;

            dto.OnEntity(entity);

            return(entity);
        }