ADO.NET Entity Framework Beta 3 and ADO.NET Entity Framework Tools CTP 2
Visit the ADO.NET forum for questions and discussions about the ADO.NET Entity Framework. For articles and more in-depth information, see the ADO.NET team blog. To download Entity Framework samples, go to the ADO.NET Samples page on the CodePlex Web site..
This release contains updates to the ADO.NET Entity Framework since the Beta 2 release and to the ADO.NET Entity Framework Tools since the first CTP. For more information about these new features, see the ADO.NET team blog.
Entity Framework
Entity Framework Tools
Entity Framework
Entity Framework Tools
The hardware requirements are the same as those for Visual Studio 2008. See the Visual Studio 2008 Readme for more details.
You must uninstall any previous pre-release versions of the ADO.NET Entity Framework, including Beta 2. Then you must uninstall any pre-release versions of Visual Studio 2008 and the .NET Framework 3.5. For instructions on how to do this, see the Visual Studio 2008 Readme or the .NET Framework 3.5 Readme.
To resolve this issue:
No workaround is available.
To resolve this issue:
Log on to the computer as a user with Administrator privileges or agree to the UAC elevation prompt on Windows Vista.
To resolve this issue:
Use the 64-bit Entity Framework runtime installer on 64-bit machines and use the 32-bit Entity Framework runtime installer on 32-bit machines.
To resolve this issue:
No workaround is available.
Using the plus (+) operator to concatenate two or more string properties into a single string in a projection raises the following exception: "DbArithmeticExpression arguments must have a numeric common type".
The following code is an example:
var query = from c in ctx.Customers where c.Country =="USA" select new CustomerID = c.CustomerID, CustomerName = c.ContactTitle +" " + c.CompanyName };"
To resolve this issue:
Use String.Concat() as follows:
var query = from c in ctx.Customers where c.Country =="USA" select new CustomerID = c.CustomerID, CustomerName = string.Concat( c.ContactTitle, "",c.CompanyName) };
In the following example, a builder method is applied to a query that contains a span. When the resulting query is compiled, the span information is lost instead of being propagated.
var q = from c in ctx.Customers.Include("Orders")
where c.CustomerID == "ALFKI"
select c;
var cq =
CompiledQuery.Compile((NorthwindEntities _ctx) => q);
foreach (var p in cq(ctx))
Console.WriteLine(
p.CustomerID + ", " +
p.Orders.Count().ToString());
// Output is "ALFKI, 0".
To resolve this issue:
If possible, use span only at the top level. Consider projecting the related entity alongside the main entity in the query, instead of using Include:
var q = from c in ctx.Customers
where c.CustomerID == "ALFKI"
select new { Customer = c, Orders = c.Orders };
var cq =
CompiledQuery.Compile((NorthwindEntities _ctx) => q);
foreach (var p in cq(ctx))
Console.WriteLine(
p.Customer.CustomerID + ", " +
p.Orders.Count().ToString());
// Output is "ALFKI, 6".
Using First() or FirstOrDefault() with a predicate expression may translate to a store query that changes the order of the source query. Therefore, you might get unexpected results when you try a query like the following. This is by design, but it is not yet well documented:
var query = from o in ctx.Orders
orderby o.OrderID descending
select o;
var first = query.First(o => o.ShipCountry=="USA");
Console.WriteLine(first.OrderID);
// Output is "10262".
foreach (var o in query)
{
if (o.ShipCountry == "USA")
{
Console.WriteLine(o.OrderID);
// Output is "11077".
break;
}
}
To resolve this issue:
If you want to get the first element in the original order, move the predicate to the source query and use First() or FirstOrDefault() without parameters.
var query = from o in ctx.Orders
where o.ShipCountry =="USA"
orderby o.OrderID descending
select o;
var first = query.First();
Console.WriteLine(first.OrderID);
// Output is "11077".
Controls that are bound to queries that retrieve complex types directly, or to queries that retrieve entities that contain complex types, will display the complex type content as the result of calling the complex type's ToString() implementation. The ADO.NET Entity Framework team is currently exploring options to enhance data binding with complex types for the final product release.
To resolve this issue:
If more granular binding of a complex type is required, you can expose the desired properties of the complex type as entity properties by adding them to the associated entity classes. Use partial classes to do this.
If you select a database in the Update Model from Database… menu item other than the database from which the model was originally created, the .edmx file may not open in the designer. If this happens, further editing is not possible.
To resolve this issue:
To generate a model from a different database, use Add New Item to add a new model to your project.
You cannot save a new project if there is a model open in the designer. Attempting to do so displays an error message.
To resolve this issue:
Close the .edmx file before saving the project.
The designer detects attempts to create a circular inheritance and displays a warning message box. However, Visual Studio may become unstable after you close the dialog box.
To resolve this issue:
No workaround is available.
Adding an Is Not Null condition to a non-nullable column in the mapping details window and validating the model reports the following error in the Visual Studio error list: "Object reference not set to an instance of an object." This issue also applies to the EdmGen.exe command line tool when you use it to validate conceptual schema definition language (CSDL), mapping specification language (MSL), and storage schema definition language (SSDL) files.
To resolve this issue:
Remove the Is Not Null condition from the column and validate again.
The designer does not update the MSL correctly when an entity property that is used in a function binding parameter is deleted. After the property is deleted, the mapping details window displays a watermark that says that the mapping was edited outside the designer.
To resolve this issue:
Unbind the entity property as a function binding parameter before deleting it.
The designer reports the following errors in the Visual Studio error window when generating a model from the AdventureWorks database:
Error 1 The first character in the name 2002 is not valid. Model1.edmx 4660 21 Error 2 The first character in the name 2003 is not valid. Model1.edmx 4661 21 Error 3 The first character in the name 2004 is not valid. Model1.edmx 4662 21
These errors will not cause a build break and can be ignored.
To resolve this issue:
Ignore these errors or exclude the view vSalesPersonSalesByFiscalYears from the Entity Data Model wizard when you generate the model from AdventureWorks.
Sometimes errors are still visible in the error window, even after the project is built successfully without errors.
To resolve this issue:
Close and reopen the solution.
Clicking the Previous button sometimes closes the wizard if there are no connections in the project.
To resolve this issue:
Add a connection in Server Explorer before adding a new ADO.NET Entity Data Model item to the project.
Double-clicking on errors in the Visual Studio error window does not always select the correct element, especially for mapping errors.
To resolve this issue:
No workaround is available.
Deleting shapes or connectors in large models (100+ shapes and connectors) may take a long time.
To resolve this issue:
No workaround is available.
For example, deleting an association key mapping using the keyboard does not clear the delete option from the drop-down list.
To resolve this issue:
No workaround is available. Please use the mouse in this CTP to edit mappings.
The file format of .edmx files has changed in CTP2. Opening .edmx files created with earlier versions of the designer is not supported.
To resolve this issue:
Recreate the .edmx file in CTP2 of the designer.
It is possible to open an .edmx file in the XML Editor by right-clicking on it in Solution Explorer and choosing Open With... and XML Editor. Although editing .edmx files in both the XML Editor and in the designer is not supported, we understand that some advanced scenarios may require it. In these cases, you should close the designer before opening the file in the XML Editor.
To resolve this issue:
Close the designer before opening the file in the XML Editor.
Facets like Access, Getter, and Setter for scalar properties cannot be changed in the Visual Studio Property window.
To resolve this issue:
Open the .edmx file in XML Editor and directly change the facets in the XML.
Projects with .edmx files created in earlier CTPs include a reference to EdmxDeploy.exe in the project post-build event. Building such projects in the release version of Visual Studio 2008 causes a build failure with a message that EdmxDeploy.exe could not be found.
To resolve this issue:
The functionality provided by EdmxDeploy.exe is now available in the EntityDeploy MSBUILD task. Modify the post-build event in project properties and remove the reference to EdmxDeploy.exe.
You cannot move or rename an .edmx file in Solution Explorer when it is currently open in the designer. If you attempt this, it raises an error message.
To resolve this issue:
Close the .edmx file in the designer before renaming or moving it in Solution Explorer.
When an .edmx file has invalid or unsupported content, or when certain validation errors occur, the designer reports errors but does not display the diagram. Instead, a watermark is displayed prompting users to open the file in XML Editor.
To resolve this issue:
Click the link in the watermark to open the .edmx file in XML Editor and fix the errors. Be sure to close the .edmx file in the designer before editing it in the XML Editor.
As noted previously, the designer reports errors but does not display the diagram when an .edmx file has invalid or unsupported content, or when certain validation errors occur. Attempting to create new entities or associations from the toolbox or context menu in this state may cause unpredictable behavior, such as crashing Visual Studio.
To resolve this issue:
No workaround is available.
A number of warnings are reported when an .edmx file is added to a Visual Basic project as a link, or when its source file is opened. You may also get the message "Line Endings in the file are not consistent. Do you want to normalize the line endings?"
To resolve this issue:
Click Yes to normalize the line endings and open the file.
The wizard reports errors in the Visual Studio error window when generating a model from a database that has tables, views, or columns that only have numbers as their names or that have special characters (such as % or /) in their names.
To resolve this issue:
Exclude the tables or views that caused the problem, or rename the table, view, or column so that its name is not composed solely of numbers and does not contain special characters.
Pressing F1 in the designer does not launch Help.
To resolve this issue:
Manually launch the Tools Help file from Start/All Programs/ADO.NET Entity Framework Preview
There is a known repainting issue with text decorators on connectors and icons in shapes. For example, changing an association's multiplicity in the Visual Studio Property window does not update the text on the connector on the designer surface. Also, changing the key facet of a scalar property does not immediately refresh its icon on the designer surface.
To resolve this issue:
No workaround is available.
When typing in the value of a table mapping condition, pressing the space bar will cause focus to be lost on the condition value text box.
To resolve this issue:
Copy and paste the desired value into the text box.
The Entity Mapping Details window occasionally loses track of the selection and reverts to showing the watermark.
To resolve this issue:
Select a different object, or click on an empty area of the diagram, then click on the Entity or Association again.
© 2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement