Hi im stuck on step 9 of the first try it out on chapter 14. this is the error i get:
The type or namespace name 'PlanetWroxEntities' could not be found (are you missing a using directive or an assembly
Here is my code
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using planetWroxModel;
public partial class Reviews_All : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
using (PlanetWroxEntities myEntities = new PlanetWroxEntities())
{
var allReviews = from review in myEntities.Reviews
where review.Authorized == true
orderby review.CreateDateTime descending
select review;
GridView1.DataSource = allReviews;
GridView1.DataBind();
}
}
}
Also when I clicked 'PlanetWroxEntities ' and pressed ctrl + . I did not get the option to create the using statement for me.
I can only generate a class or new type.
And here is the code for the designer file
Code:
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="564f075dc93f490a86a589ad8610513f" Name="Diagram1">
<EntityTypeShape EntityType="planetWroxModel.Genre" Width="1.5" PointX="0.75" PointY="1.5" IsExpanded="true" />
<EntityTypeShape EntityType="planetWroxModel.Review" Width="1.5" PointX="3" PointY="1" IsExpanded="true" />
<AssociationConnector Association="planetWroxModel.FK_Review_Genre" ManuallyRouted="false" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>
</edmx:Edmx>
Thanks