Created
September 13, 2016 19:16
-
-
Save wescleymatos/455be3dbe611bd6be363d13b439c30b8 to your computer and use it in GitHub Desktop.
dúvida composição
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Dominio { | |
public class Aluno | |
{ | |
public Aluno( string nome, string matricula, string sexo, DateTime dataNascimento, string cpf, string corRaca, string email) | |
{ | |
Nome = nome; | |
Matricula = matricula; | |
DataNascimento = dataNascimento; | |
Cpf = cpf; | |
Sexo = sexo; | |
CorRaca = corRaca; | |
Email = email; | |
} | |
protected Aluno() | |
{ | |
this.Responsaveis = new List<Responsaveis>(); | |
} | |
public int Id { get; set; } | |
public string Nome { get; set; } | |
public string Matricula { get; set; } | |
public DateTime DataNascimento { get; set; } | |
public string Cpf { get; set; } | |
public string Sexo { get; set; } | |
public string CorRaca { get; set; } | |
public string Email { get; set; } | |
#region Navigation Properties | |
public virtual ICollection<Responsavel> Responsaveis { get; set; } | |
#endregion | |
} | |
public class Responsavel | |
{ | |
public Responsavel( string nome, int idUnidade ) | |
{ | |
Nome = nome; | |
UnidadeId = idUnidade; | |
} | |
protected Responsavel() | |
{ | |
this.Alunos = new List<Alunos>(); | |
} | |
public int Id { get; set; } | |
public string Nome { get; set; } | |
#region Navigation Properties | |
public virtual ICollection<Aluno> Alunos { get; set; } | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment