Skip to main content

Top Questions and Answers on Data

  1. Why did Microsoft rename ADO.NET Data Services to WCF Data Services
  2. Where does Microsoft stand on LINQ to SQL?
  3. What's New in ADO.NET Entity Framework 4 and ADO.NET Data Services 4?
  4. What is the Open Data Protocol (OData)?

The following questions and answers are out of date.For the latest information on SQL Server Modeling-related technologies, i.e. "M", "Quadrant", SQL Server Modeling Services, and the Repository, read this update.

  1. So what happened to "Oslo"?
  2. What's happening to the "M" language? How do “M” and the Entity Data Model relate to each other? Which do I choose?
  3. When does a developer use “M” vs. T-SQL? Should I use “M” rather than T-SQL to define the shape of my data?
  4. What is "Quadrant" and what does it do for me?
  5. When will the SQL Server Modeling CTP ship?
  6. How does the SQL Server Modeling CTP relate to .NET?

 

Question #1: Why did you rename ADO.NET Data Services to WCF Data Services?

A: As you’ve probably observed, we’ve been working hard over the past year or so to grow our application stacks to better support the types of applications (Silverlight, rich desktop, AJAX, etc) and services (SOAP, REST, etc) that are required to build modern, robust solutions. A few of the technologies we have introduced over the past few years help in building services and n-tier applications: Windows Communication Foundation, .NET RIA Services and ADO.NET Data Services.

We’ve been very pleased to see each of these stacks be well received in the community and, given that positive feedback, we’ve been eagerly working on expanding each based on your comments. While today these stacks target different application scenarios and/or levels of abstraction, we see opportunities to align their foundations by building the concepts shared in each stack (authentication, conventions for business logic, logging, configuration, etc) on a single foundation. Additionally, we’ve heard your feedback that traversing our offerings in this space is, at times, too complicated.

So, with the goal of simplifying our platform by aligning common components, we announced a few changes we’ll be making to achieve our goals….

Windows Communication Foundation (WCF) == your “one stop shop” for building services and n-tier applications

Since .NET Framework 3.0, WCF has been the place to go to in the .NET Framework to rapidly build service-oriented applications that communicate across the web and the enterprise. As we developed the product roadmaps for .NET RIA Services and ADO.NET Data Services we found that they complement the core WCF stack quite well as components/extensions for WCF or as new top-level layers of abstraction.

To formalize our direction in aligning these technologies, we made a few name changes in the .NET Framework 4 timeframe. ADO.NET Data Services changed its name slightly to be WCF Data Services and .NET RIA Services is now known as WCF RIA Services.

We think of these name changes as a key first step in simplifying our offerings in this space.

 

Question #2: Where does Microsoft stand on LINQ to SQL?

Answer: We would like to be very transparent with our customers about our intentions for future innovation with respect to LINQ to SQL and the Entity Framework.

In .NET 4.0, we continue to invest in both technologies. Within LINQ to SQL, we made a number of performance and usability enhancements, as well as updates to the class designer and code generation. Within the Entity Framework, we listened to a great deal to customer feedback and responded with significant investments including better foreign key support, T4 code generation, and POCO support.

Moving forward, Microsoft is committing to supporting both technologies as important parts of the .NET Framework, adding new features that meet customer requirements. We do, however, expect that the bulk of our overall investment will be in the Entity Framework, as this framework is built around the Entity Data Model (EDM). EDM represents a key strategic direction for Microsoft that spans many of our products, including SQL Server, .NET, and Visual Studio. EDM-based tools, languages and frameworks are important technologies that enable our customers and partners to increase productivity across the development lifecycle and enable better integration across applications and data sources.

 

Question #3: What's New in ADO.NET Entity Framework 4 and WCF Data Services 4?

Answer:: There are a number of exciting features shipping in .NET Framework 4.0 and Visual Studio2010. In WCF (ADO.NET) Data Services a few such features are:

  • Data Binding: The data services client library for the .NET Framework 3.5 SP1 and Silverlight has been extended to support two-way data binding for WPF and Silverlight based applications.
  • Row Count: One scenario we heard a ton of feedback on after shipping version 1 of ADO.NET Data Services in the .NET Framework 3.5 SP1 is the ability for the a client of a data service to determine the total number of entities in a set without having to retrieve them all. To address this need, we have extended the data services addressing scheme to allow a client to obtain this type of information without having to download all the entities in a set.
  • Feed Customization (aka "Web Friendly Feeds"): A common ask we have received is to provide the ability to customize how entities are mapped into the various elements of an AtomPub feed. This feature does just that by providing a data service author declarative control over how the data service runtime maps the properties of an entity (e.g. a Customer, Order, etc) to the elements of a feed.
  • Server Driven Paging: This feature allows a service author to set per collection limits on the total number of entities returned for each request. For example, if you had a data service that exposes photos, you likely want to limit the total number of photos a single request to the service can retrieve because the total collection of photos may be very large. In addition to limiting the number of photos returned per request, the server provides the client a "next link" which is simply a URI specifying how to continue retrieving the rest of the entities in the collection not returned by the first request. For those familiar with AtomPub, this feature adds support for AtomPub <next ..> elements to the data service runtime.
  • Enhanced BLOB Support: This feature enhances the BLOB support provided in V1 to enable data services to stream arbitrarily large BLOBs, store binary content separate from its metadata, easily defer the loading of BLOB content when its metadata is requested, etc.
  • New "Data Service Provider" Interface for Custom Provider Writers: As the data services runtime has evolved, so has the number of ways people want to plug data into the data service framework. In V1, two methods (Entity Framework and arbitrary .NET classes) were supported to enable a data service to interact with various diverse data sources. To address another class of environments and data sources we are exploring a way to write a "custom" provider for those cases when the previous two provider models don't meet your needs.
  • Projections: The data services client library and server now supports projections both in the URI syntax and LINQ query syntax.

In the ADO.NET Entity Framework we listened to a great deal to customer feedback and responded with significant investments including:

  • Foreign Keys: Entity Framework 4 now includes a new type of associations (Foreign Key Associations) that allow you to have Foreign Key properties on your entities. Foreign Key Associations simplify some key scenarios such as data binding and can be included or excluded when using the model creation and update wizards. Independent Associations supported in .NET 3.5 remain as-is, but Foreign Key Associations become the default type of association going forward. Referential integrity constraints can now be created from the designer.
  • POCO Support: Fix-up of changes to navigation properties and FKs is now performed automatically on DetectChanges and SaveChanges. It is also now possible to declare collections as ISet<T> in POCO objects. When either ICollection<T> or ISet<T> is used, the default collection type materialized is HashSet<T>, which among other advantages does not allow duplicate entries.
  • Lazy Loading on by Default in new Models: When you create a new model in VS 2010, you get generated ObjectContext types that have lazy loading turned on by default (context.ContextOptions.LazyLoadingEnabled = true is placed in the constructor). This simplifies the default experience of working with objects. Of course, it is still possible to turn it off and do explicit and eager loading.
  • EntityDataSource support for Query Extenders and POCO: EntityDataSource now includes support for ASP.NET Query Extenders and POCO entities. Query Extenders are a new addition to ASP.NET that allow you to have more control over the data retrieval query of a Data Source, leveraging the LINQ capabilities of Entity Framework.
  • Support for Binary Keys: The Entity Framework now allows you to have binary property types (and varbinary storage columns) mapped as Entity Key/Foreign Key.
  • ObjectMaterialized event: It is now possible to write logic that is executed immediately after an object has been materialized. This event is raised after the scalar, complex and reference properties are populated (collections are filled afterwards).
  • Object Services API improvements to enable N-Tier and Self Tracking Entities: ObjectStateEntry.GetUpdatableOriginalValues method provides a access to an updatable data record that you can use to establish the original state of an entity at the property level.
  • Improvements to the generated SQL: Numerous simplifications and improvements of the SQL generated when querying using the Entity Framework have been done including removal of joins, better translation of certain functions, elimination of constants used for internal purposes, which results in removing of levels of nesting and others.
  • Navigation Property Management: Users can now delete and add navigation properties, enabling the creation of one-way associations.
  • Improved Database Generation: SQL CE support has been added. In addition, customization of database generation is significantly simpler now, with the ability to specify the DDL generation template to be used, as well as automatic discovery of installed database generation workflows and templates.
  • New Extensibility APIs: New APIs enable users to add custom properties to any object in the model and have those properties show up in the property sheet. In addition, other extension points allow for customization of models on load, save, and after the model creation and update wizards run.
  • Generation of Complex Types from Stored Procedures: When creating a function import from a function, the UI can now detect the columns returned from a stored procedure and create a corresponding complex type. In addition, existing complex types can be updated when a stored procedure definition changes.
  • Greatly Improved Facet Management: The designer can now distinguish between empty and blank values, and various property facet defaults are handled more cleanly and consistently.
  • LINQ to Entities improvements: Support for recognizing additional patterns in queries, simplification of EntityFunctions and SqlFunctions static classes and OrderBy is now lifted over filters and other operations. We are also actively working to address new asks such as concepts like model-defined functions in this release.

Question #4: What is the Open Data Protocol (OData)?

Answer: The Open Data Protocol (OData) is an open protocol for sharing data. It provides a way to break down data silos and increase the shared value of data by creating an ecosystem in which data consumers can interoperate with data producers in a way that is far more powerful than currently possible, enabling more applications to make sense of a broader set of data. Every producer and consumer of data that participates in this ecosystem increases its overall value. ADO.NET Data Services was the first Microsoft technology to support the Open Data Protocol in Visual Studio 2008 SP1 and provides developers with client libraries for .NET, Silverlight, AJAX, PHP and Java. In addition to WCF (ADO.NET) Data Services, Microsoft now supports the OData in SQL Server 2008 R2,

 

The following questions and answers are out of date.For the latest information on SQL Server Modeling-related technologies, i.e. "M", "Quadrant", SQL Server Modeling Services, and the Repository, read this update.

 

Question #1: So what happened to “Oslo”?

Answer: See the blog post above.

 

Question #2: What's happening to the "M" language? How do “M” and the Entity Data Model relate to each other? Which do I choose?

Answer: The code name “M” modeling language is a human-friendly language for building domain models and working with data. "M" allows users to write down how they want to structure and query their data using a convenient textual syntax. It also supports rapid development of new domain-specific languages based on concise grammar definitions that drive the M compiler.

Microsoft is also presently aligning “M” with the Entity Data Model as used by the Entity Framework and Data Services. This will result in one common data model with two alternate representations: CSDL, the current XML-based language for the Entity Data Model that’s best suited for interoperability, and “M”, which is better suited for programmers.

See Entity Data Model in the MSDN Library for more information on EDM itself.

 

Question #3: When does a developer use “M” vs. T-SQL? Should I use “M” rather than T-SQL to define the shape of my data?

Answer: Today, “M” is not yet a shipping product, so customers should definitely use T-SQL for their mission-critical applications. Once “M” ships, the goal is to use “M” to describe a problem domain in a higher-level of abstraction. Then, “M” can be translated into T-SQL, C# or other formats, enabling further optimizations in the native target runtime.

 

Question #4: What is "Quadrant" and what does it do for me?

Answer: “Quadrant” is a tool for viewing, querying, and editing data in a SQL database with a variety of built-in viewers such as tree, list, table, and master/detail. “Quadrant” also provides the ability to modify those built-in viewers and create composite viewers with simple UI-based customization functionality. Customization can also be accomplished with the code name “M” language, and the tool itself can be extended. All together, “Quadrant” enables the creation of domain-specific browsing and editing experiences.

The best way to understand “Quadrant” is to see it in action. For this reason the “Quadrant” team has produced a number of videos highlighting the usage of “Quadrant”. These can be found on the Data Developer Center’s pre-release videos page.

 

Question #5: When will the SQL Server Modeling CTP ship?

Answer: The technologies included in this CTP will become part of a future major version of Microsoft SQL Server.

 

Question #6. How does the SQL Server Modeling CTP relate to .NET?

Answer: The CTP is related to the .NET Framework in two principal ways.

First, the SQL Server Modeling CTP is providing capabilities into the .NET Framework to make it easier for developers to create model-driven applications.

Second, many parts of the .NET Framework itself are already model-driven. The SQL Server Modeling CTP will drive consistency in how .NET Framework components implement a model-driven approach in the future.

 

Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?