/// <summary>
 /// Altera dados na base de dados
 /// </summary>
 /// <param name="entrevistado"></param>
 public void Editar(EntrevistadoModel entrevistado)
 {
     tb_entrevistado entrevistadoE = new tb_entrevistado();
     Atribuir(entrevistado, entrevistadoE);
     unitOfWork.RepositorioEntrevistado.Editar(entrevistadoE);
     unitOfWork.Commit(shared);
 }
 /// <summary>
 /// Insere um novo na base de dados
 /// </summary>
 /// <param name="entrevistado">Dados do modelo</param>
 /// <returns>Chave identificante na base</returns>
 public int Inserir(EntrevistadoModel entrevistado)
 {
     tb_entrevistado entrevistadoE = new tb_entrevistado();
     Atribuir(entrevistado, entrevistadoE);
     unitOfWork.RepositorioEntrevistado.Inserir(entrevistadoE);
     unitOfWork.Commit(shared);
     return entrevistadoE.idTB_ENTREVISTADO;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new tb_entrevistado object.
 /// </summary>
 /// <param name="idTB_ENTREVISTADO">Initial value of the idTB_ENTREVISTADO property.</param>
 public static tb_entrevistado Createtb_entrevistado(global::System.Int32 idTB_ENTREVISTADO)
 {
     tb_entrevistado tb_entrevistado = new tb_entrevistado();
     tb_entrevistado.idTB_ENTREVISTADO = idTB_ENTREVISTADO;
     return tb_entrevistado;
 }
 /// <summary>
 /// Atribui dados do ClienteModel para o Cliente Entity
 /// </summary>
 /// <param name="entrevistado">Objeto do modelo</param>
 /// <param name="entrevistadoE">Entity mapeada da base de dados</param>
 private void Atribuir(EntrevistadoModel entrevistado, tb_entrevistado entrevistadoE)
 {
     entrevistadoE.idTB_ENTREVISTADO = entrevistado.idtb_entrevistado;
      entrevistadoE.NOME = entrevistado.nome;
      entrevistadoE.SOBRENOME = entrevistado.sobrenome;
      entrevistadoE.EMAIL = entrevistado.email;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tb_entrevistado EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotb_entrevistado(tb_entrevistado tb_entrevistado)
 {
     base.AddObject("tb_entrevistado", tb_entrevistado);
 }