public void aluno_matriculado_deve_constar_todos_os_valores_atribuidos() { var aluno = AlunoStub.AlunoValido; var e = new AlunoMatriculado(aluno.EntityId, aluno); e.AggregateId.Should().Be(aluno.EntityId); e.Aluno.EntityId.Should().Be(aluno.EntityId); e.DataExecucao.Date.Should().Be(DateTime.Today); }
public bool Incluir(AlunoMatriculado aluno) { try { using (var context = new glassDbEntities()) { context.tb_aluno_matriculado.Add(aluno); context.SaveChanges(); return(true); } } catch (Exception ex) { throw new Exception(ex.ToString()); } }
public AlunoMatriculado Editar(AlunoMatriculado aluno) { try { using (var context = new glassDbEntities()) { var result = context.tb_aluno_matriculado.FirstOrDefault(x => x.Usuario == aluno.Usuario); result = aluno; context.SaveChanges(); return(result); } } catch (Exception ex) { throw new Exception(ex.ToString()); } }