Below is a screenshot of the data model classes I can quickly create using the LINQ to SQL designer to model the "Northwind" sample database: We'll revisit our data model in Step 5 of this tutorial below when we add some business validation rules to it.
But to begin with we'll just use the above data model as-is to build our UI. NET page with a control to bind the Grid View to our data model.
NET control that implements the Data Source Control pattern introduced with ASP. It is similar to the Object Data Source and Sql Data Source controls in that it can be used to declaratively bind other ASP. Where it differs is that instead of binding directly to a database (like the Sql Data Source) or to a generic class (like the Object Data Source), the on my page that points to my LINQ to SQL datacontext class, and identify the entities (for example: Products) in the LINQ to SQL data model I want to bind against.
The key configuration option is required if you create a Store for read-write data access. If you need to specify a compound key property, assign an array of getters to this option.
When updates are made, the LINQ to SQL ORM will automatically ensure that all business rules and validation logic we've added (as partial methods) to the LINQ to SQL data model pass before persisting anything to the database.
Important: The beauty of LINQ and LINQ to SQL is that it obviously isn't tied to being used only in UI scenarios - or with particular UI binding controls like the Linq Data Source.
When deserialization is disabled in the store, date-time strings are converted to Date objects at the widget level.
When filtering, the widget reverts an entered date-time value to a string based on the date Serialization Format option's value and passes the string to the OData Store for further processing.