Hi,
I'm on my first day with Entity Framework. I managed to get some sample code working in a console app as follows:
using (var ctx = new ProgrammingEFDB1Entities())
{
foreach (Address addr in ctx.Addresses)
Console.WriteLine("{0} {1}", addr.Street1, addr.PostalCode);
}
I did this by making a model from a database and hitting Next-Next-Finish. It was very easy but worked much like Linq to Sql. I then tried to do this in a Web Site project and had no luck. The DataContext ProgrammingEFDB1Entities wasn't recognized in the Web Site project.
I don't know if this has something to do with a namespace issue. I have done pretty much the same steps in the Web Site that I did in the Console Application and replaced "Console.WriteLine()" with "Response.Write()". I suspect it might be some wierd namespace issue, but I don't know where to go next.
Thanks,
John