Ho il codice qui sotto in un file .cs e sto incrociando gli errori qui sotto, ogni aiuto sarebbe apprezzato.nome o spazio dei nomi non esiste nello spazio dei nomi
using System.Data.Entity;
namespace Assignment2.Models
{
public class TicketBookingEntities : DbContext
{
public DbSet<Performance> Performances { get; set; }
public DbSet<Production> Productions { get; set; }
}
}
Errori:
Error 1 The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
Error 2 The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
Error 3 The type or namespace name 'DbSet' could not be found (are you missing a using directive or an assembly reference?)
Error 4 The type or namespace name 'DbSet' could not be found (are you missing a using directive or an assembly reference?)
** manca un riferimento all'assembly? ** – asawyer
Prova ad aggiungere il riferimento. Fare clic con il tasto destro del mouse sul file della soluzione, fare clic su aggiungi riferimento, quindi cercare la dll appropriata. – Sandeep
l'aggiunta di un riferimento è totalmente diversa dalla scrittura di 'using Some.Namespace;' –