pero nunca había manejado la parte de MVC (MODELO VISTA CONTROLADOR) es donde
he tenido problemas por que no me cae nada a la base de datos.
A grandes rasgos maneje lo siguiente
- Tengo mi solución con una implementacion CLASS LIBRARY donde aloje:
mi ADO.NETY 2 CLASES de tipo c#
-Tengo un nuevo proyecto MVC5
donde tengo de igual manera
- 2 Controladores
- 2 Vistas
- 2 Modelos
y por ejemplo cuando ejecuto mi Aplicación me sale un error
Código:
en System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
en System.Data.Entity.Internal.InternalContext.Initialize()
en System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
en System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
en System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
en System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
en System.Linq.Queryable.OrderBy[TSource,TKey](IQueryable`1 source, expression`1 keySelector)
en DAL.LiderProyectoDAL.GetAll() en c:\Users\MerianSW\Documents\Visual Studio 2013\Projects\ProyectAdmin\DAL\CajeroDAL.cs:línea 98
Si checo esa famosa linea 98 me sale lo siguiente:
Código
public List<Cajero> GetAll() { try { var query = from u in Context.Cajero orderby u.Nombre select u; return query.ToList(); } catch (InvalidOperationException io) { } catch (Exception ex) { }
Pero no entiendo por que el error gracias de antemano!