LINQ to SQL (Pre-Release)
Discuss and ask questions about LINQ in Visual Studio 2010 Pre-Release Builds (CTPs/Betas) This forum has been retired and in now read-only.”
Announcements
- Link
LINQ to SQL changes in .NET 4.0
Performance
- Query plans are reused more often by specifically defining text parameter lengths
- Identity cache lookups for primary key with single result now includes query.Where(predicate).Single()/SingleOrDefault/First/FirstOrDefault
- Reduced query execution overhead when DataLoadOptions specified (cache lookup considers DataLoadOptions value equivalency – post beta 1)
Usability
- ITable<T> interface for additional mocking possibilities
- Contains with enums automatically casts to int or string depending on column type
- Associations can now specify non-primary-key columns on the other end of the association
- Support list initialization syntax for queries
- LinqDataSource now supports inherited entities
- LinqDataSource support for Dynamic Data query extenders added
Query stability
- Contains now detects self-referencing IQueryable and doesn't cause a stack overflow
- Skip(0) no longer prevents eager loading
- GetCommand operates within SQL Compact transactions
- Exposing Link<T> on a property/field is detected and reported correctly
- Compiled queries now correctly detect a change in mapping source and throw
- String.StartsWith, EndsWith and Contains now correctly handles ~ in the search string
- Now detects multiple active result sets (MARS) better
- Associations are properly created between entities when using eager loading with Table-Valued Functions (TVFs)
- Queries that contain sub-queries with scalar projections now work better
Update stability
- SubmitChanges no longer silently consumes transaction rollback exceptions
- SubmitChanges deals with timestamps in a change conflict scenario properly
- IsDbGenerated now honors renamed properties that don't match underlying column name
- Server-generated columns and SQL replication/triggers now work instead of throwing SQL exception
General stability
- Binary types equate correctly after deserialization
- EntitySet.ListChanged fired when adding items to an unloaded entity set
- Dispose our connections upon context disposal (ones passed in are untouched)
SQL Metal
- Foreign key property setter now checks all affected associations not just the first
- Improved error handling when primary key type not supported
- Now skips stored procedures containing table-valued parameters instead of aborting process
- Can now be used against connections that use AttachDbFilename syntax
- No longer crashes when unexpected data types are encountered
LINQ to SQL class designer
- Now handles a single anonymously named column in SQL result set
- Improved error message for associations to nullable unique columns
- No longer fails when using clauses are added to the partial user class
- VarChar(1) now correctly maps to string and not char
- Decimal precision and scale are now emitted correctly in the DbType attributes for stored procedures
- Foreign key changes will be picked up when bringing tables back into the designer without a restart
Code generation (SQL Metal + LINQ to SQL class designer)
- Stored procedures using original values now compiles when the entity and context namespaces differ
- Virtual internal now generates correct syntax
- Mapping attributes are now fully qualified to prevent conflicts with user types
- KnownTypeAttributes are now emitted for DataContractSerializer with inheritance
- Delay-loaded foreign keys now have the correct, compilable, code generated
- Using stored procedures with concurrency no longer gets confused if entities in different namespace to context
- ForeignKeyReferenceAlreadyHasValueException is now thrown if any association is loaded not just the first
Filtering and SortingUse these options to narrow down the question and discussion list.
- 04942

Notice:This forum will be retired in a few days. Please do not post new threads here.
Kenneth Lee Friday, April 22, 2011 2:05 AM - 03555

Restore the CCAMAwards.bak file in your SQL Server 2008 Express
METII Thursday, April 21, 2011 8:27 PM - 18141

How to convert pdf to PNG fastly and quickly?
ruthyang Thursday, August 19, 2010 8:40 AM - 14482

Convert Boolean to condition in Expression tree
nima_API Monday, March 07, 2011 7:39 PM - 25094

Linq returing Object to DataTable
muallim_ul_ilm Monday, January 31, 2011 8:00 PM - 13150

LINQ help
MissingDogs Tuesday, April 12, 2011 2:29 AM - 03433

LINQ In Automate Data Manipulation Control
Abdul Sami Siddiqui Wednesday, April 13, 2011 5:32 PM - 05471

Linq
Jayatirtha Joshi Friday, April 08, 2011 2:47 PM - 03308

Help: Stored Proc vs. LinQ
8964 Thursday, April 07, 2011 4:02 PM - 25227

How to left join two Datables?
Crimsonland Friday, October 22, 2010 5:55 AM - 14675

Attach Database with password in linq to sql
Samudra Vishvajith Tuesday, January 11, 2011 5:56 AM - 14486

How to use LINQ
kizildag Friday, February 04, 2011 2:58 PM - 03991

WCF
Lkg2000 Monday, March 28, 2011 1:07 PM - 04387

Stored Proc with Output parametes -- values not returned.
ZooDoo4U Friday, March 18, 2011 9:04 PM - 04098

How to write a linqdatasource _inserting (object sender,linqDatasourceInsertEvent args)?
mikeouou Monday, March 14, 2011 11:03 PM - 14438

How to convert var result from LINQ to Dataset
Rupesh Shivarkar Wednesday, February 23, 2011 3:16 PM - 14368

EmitDefaultValue Code Generation Problem - Failed to generate code for the service reference
nanung Sunday, February 27, 2011 4:36 AM - 03689

Linq V/S Sql Syntax
AtulKatare Tuesday, March 01, 2011 3:17 PM - 03770

Browser snifffing using Blackberry
Saipriyadarshini Wednesday, February 23, 2011 9:35 AM - 04524

LINQ + Webservice
Heron Dantas Tuesday, February 01, 2011 12:24 PM

