I'm having trouble trying to understand what to do here.
My objective isn't as simple as a regular old CRUD form to create a new entity, but rather a browse index page that will list all of the Evaluations in my database.
Each evaluation is attached to a RegisteredCourse which in turn has a Teacher attached to it.
Here is how I'd like to present the information:
My table structure doesn't allow me to just invoke it simply, so I know I have to create a ViewModel to have my controller give my View something nice and useful.
My question is how to create this ViewModel. I'm stumped because I've never tackled this sort of problem before. Thanks. Below is SQL schema if that helps.
create table Grado(
ID int identity(1,1) primary key,
Nombre varchar(64)
)
create table Jefe(
ID int identity(1,1) primary key,
Nombre varchar(128),
Apellido varchar(256)
)
create table Area(
ID int identity(1,1) primary key,
IDJefe int foreign key references Jefe(ID),
Nombre varchar(64)
)
create table Carrera(
ID int identity(1,1) primary key,
IDArea int foreign key references Area(ID),
Nombre varchar(64)
)
create table Docente(
ID int identity(1,1) primary key,
IDCarrera int foreign key references Carrera(ID),
IDGrado int foreign key references Grado(ID),
Nombre varchar(128),
Apellido varchar(256),
Carnet varchar(20),
FechaNacimiento datetime
)
create table Materia(
ID int identity(1,1) primary key,
IDCarrera int foreign key references Carrera(ID),
Nombre varchar(64)
)
create table MateriaProgramada(
ID int identity(1,1) primary key,
IDMateria int foreign key references Materia(ID),
IDDocente int foreign key references Docente(ID),
Ano datetime,
Semestre int,
Modulo int
)
create table Evaluador(
ID int identity(1,1) primary key,
Nombre varchar(256)
)
create table Evaluacion(
ID int identity(1,1) primary key,
IDMateriaProgramada int foreign key references MateriaProgramada(ID),
IDEvaluador int foreign key references Evaluador(ID),
Tema int,
Horario int,
Secuencia int,
Pizarra int,
Audiovisuales int,
Letra int,
Voz int,
Gestos int,
Ejemplificacion int,
Preguntas int,
Dominio int,
Participacion int,
Observaciones varchar(2048),
MateriasPosibles varchar(1024),
ExigenciasAcademicas bit
)