vgruppo
asked on
Entity Framework Code First
Hi,
I'm trying to write my first project for Entity Data Model with Code First approach.
My project is composed in 3 part:
EFDemo a console project
Demo.data a class library about my object model
Demo.dataAccess a class library about my DbContext
The error viewable in the image attached, is not understandable for me.
Please suggest me where to find the trouble
Thanks
namespace Demo.Data
{
public class Attendee
{
[Key]
private int AttendeeID { get; set; }
[StringLength(50)]
private string LastName { get; set; }
private DateTime DateAddeted { get; set; }
}
}
namespace Demo.DataAccess
{
public class CodeContext : DbContext
{
public CodeContext() :
base("Server=.;Database=Co deStock;Tr usted_Conn ection=tru e")
{
}
public DbSet<Attendee> Attendees { get; set; }
}
}
I'm trying to write my first project for Entity Data Model with Code First approach.
My project is composed in 3 part:
EFDemo a console project
Demo.data a class library about my object model
Demo.dataAccess a class library about my DbContext
The error viewable in the image attached, is not understandable for me.
Please suggest me where to find the trouble
Thanks
namespace Demo.Data
{
public class Attendee
{
[Key]
private int AttendeeID { get; set; }
[StringLength(50)]
private string LastName { get; set; }
private DateTime DateAddeted { get; set; }
}
}
namespace Demo.DataAccess
{
public class CodeContext : DbContext
{
public CodeContext() :
base("Server=.;Database=Co
{
}
public DbSet<Attendee> Attendees { get; set; }
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.