У меня есть свойствоНе может неявно преобразовать тип «System.Collections.Generic.IEnumerable Для System.Collections.Generic.IEnumerable <TiendaDeportes.producto>
public IEnumerable<producto> p_producto {
get {
return ((from ii in contexto.productos
orderby ii.nombre ascending
select new producto {
productoID = ii.productoId,
nombre = ii.nombre,
descripcion = ii.descripcion,
categoria = ii.categoria,
precio = ii.precio}));
}
}
внутри Default.aspx
public IEnumerable<producto> filtroCategoria()
{
IEnumerable<producto> productos = repositorio.p_producto; <---- Error why ?
}
Резюме
не может неявно преобразовать тип '
System.Collections.Generic.IEnumerable<TiendaDeportes.Modelos.producto>
' до 'System.Collections.Generic.IEnumerable<TiendaDeportes.producto>
'. Явное преобразование существует (вы пропали без вести бросок?)
Большое спасибо моему другу. Привет из Мехико – Vesper