7/12/2007 15:06 El Bruno

[VS2008] ADO.Net Entity Framework Beta 3

Buenas,

mientras en el equipo de Soluciones de Avanade Spain, seguimos debatiendo sobre las mejores opciones para abordar una aplicación, me encuentro con una nueva versión del ya popular ADO.Net Entity Framework. Esta versión posee muchos cambios internos con respecto a la Beta 2 pero los más interesantes están orientados a la implementación de la interacción con la DB y LINQ, esta es la lista completa de cambios:

  1. EDM Changes
    1. CommandText attribute on Function element in SSDL schema has been changed to a child Element.
    2. Changed all Enumeration values in Schema Files to have Pascal Casing so that they are consistent.
    3. GetMappedPrimitiveType method on MetadataWorkspace and ItemCollection class has been removed.
    4. StoreItemCollection that is Constructed over SqlConnection needs an Open or Openable connection. Previously a non-null SqlConnection would have worked even if it could not be opened.
  2. Entity Service Changes
    1. Unsigned types have been removed from EDM/CSDL type system.
    2. Obtaining the native SQL generated for a given command has changed. EntityCommand - DbProviderServices.CreateCommandDefinition, ObjectQuery.CreateCommandTree() and DbProviderServices.CreateCommandDefinition are no longer available
    3. Canonical function Edm.Length() ignores trailing white space when connected to SQL Server (any version).
  3. LINQ to Entity Changes
    1. Group By can no longer be applied on a navigation property
  4. Object Service Changes
    1. ObjectStateManager.GetObjectStateEntry() no longer accepts an entity object instance as a parameter
    2. ObjectQuery.First(), -FirstOrDefault(), and -Exists() have been removed.
    3. ObjectQuery.Parameters collection is locked once the query is compiled/executed.
    4. EntityKey.EntityKeyValues has changed from ReadOnlyCollection<KeyValuePair<string, object>> to EntityKeyMember[].
    5. ObjectContext no longer opens a connection during the constructor.
    6. EntityKey class no longer implements IXmlSerializable
    7. EntityKey(EntitySet entitySet, IEnumerable<KeyValuePair<string, object>> entityKeyValues) constructor has been removed.
    8. EntityKey(string qualifiedEntitySetName, string[] keyNames, object[] keyvalues) constructor has been removed
    9. ObjectStateManager.GetEntityKey(object) has been removed.
    10. EntityCollection.CollectionChanged event has been renamed to AssociationChanged
    11. ObjectQuery IListSource implementation is explicitly implemented.
    12. ObjectContext.Refresh no longer takes a params array of objects to refresh.
    13. ObjectQuery.GetResultType() requires the user to open the connection.
  5. Tool Changes
    1. EDMX files created in CTP1 don't always open in CTP2 of the designer
    2. Build error when projects with .edmx files created in Visual Studio Beta 2 and EDM Designer CTP 1 are rebuilt in Visual Studio 2008 RTM

y sobre la clásica pregunta sobre cuando utilizar LINQ y cuando utilizar ADO.Net Entity Framework, me remito a palabras de Microsoft:

Si está escribiendo una aplicación que requiere cualquiera de las siguientes características, se debe utilizar ADO.NET Entity Framework:

  • es necesario poseer una capacidad que permita definir de una forma más flexible la asignación a un esquema relacional existente
  • es necesario poseer una capacidad que permita realizar consultas relacionales almacenadas en versiones diferentes de la familia de productos de Microsoft SQL Server
  • es necesario poseer una capacidad que permita compartir un modelo a través de escenarios de replicación, reporting, inteligencia empresarial, Integration Services, etc.
  • es necesario poseer la capacidad de realizar consultas utilizando un lenguaje que aplique sobre un modelo conceptual sin materializar resultados como objetos

Descarga:

 

Saludos @ La Finca

El Bruno

Crossposting from ElBruno.com
Comparte este post: