I have class Funcionario
and Projeto
. Both have their Id's.
I want to create a class ProjetoFuncionario
and would like to instantiate the primary key of the two in this class.
How can I do it?
namespace Exercicio1.Models
{
public class Projeto
{
public long id_Projeto { get; set; }
public string nome_Projeto { get; set; }
public List<FuncionarioModel> listaProjeto = new List<FuncionarioModel>();
}
}
And also the class Funcionario
:
public class FuncionarioModel
{
string dataAtual = DateTime.Now.Day.ToString();
public long id_funcionario { get; set; }
[Required]
[DisplayName(" Nome.: ")]
[StringLength(40, ErrorMessage = " O Campo Nome permite apenas 40 caracteres!")]
public string nom_funcionario { get; set; }
[Required]
}