2
This is my domain
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;
namespace Dominio
{
public class Bolsa_AlunoProva
{
public int ID { get; set; }
public int Nota { get; set; }
public DateTime DataInicial { get; set; }
public DateTime DataFinal { get; set; }
public virtual Bolsa_Aluno Aluno { get; set; }
[ForeignKey("Bolsa_ProvaID")]
public virtual Bolsa_Prova Prova { get; set; }
}
}
However, I cannot use the [ForeignKey("Bolsa_ProvaID")]
because it points to lack of references. However, the necessary reference is not only System.ComponentModel.DataAnnotations
?
@Edit
You can put exactly the error that is appearing to you in your question?
– Leonel Sanches da Silva