Issue How do I properly convert two columns from SQL (2008) using Linq into a Dictionary (for caching)? I currently loop through the IQueryable b/c I can’t get the ToDictionary method to work. Any ideas? This works: var query =
Continue readingTag: linq-to-sql
[SOLVED] How can I reject all changes in a Linq to SQL's DataContext?
Issue On Linq to SQL’s DataContext I am able to call SubmitChanges() to submit all changes. What I want is to somehow reject all changes in the datacontext and rollback all changes (preferable without going to the database). Is this
Continue reading[SOLVED] How to select only the records with the highest date in LINQ
Issue I have a table, ‘lasttraces’, with the following fields. Id, AccountId, Version, DownloadNo, Date The data looks like this: 28092|15240000|1.0.7.1782|2009040004731|2009-01-20 13:10:22.000 28094|61615000|1.0.7.1782|2009040007696|2009-01-20 13:11:38.000 28095|95317000|1.0.7.1782|2009040007695|2009-01-20 13:10:18.000 28101|15240000|1.0.7.1782|2009040004740|2009-01-20 14:10:22.000 28103|61615000|1.0.7.1782|2009040007690|2009-01-20 14:11:38.000 28104|95317000|1.0.7.1782|2009040007710|2009-01-20 14:10:18.000 How can I, in LINQ to SQL, only get the
Continue reading[SOLVED] null check nested objects before using SelectMany
Issue I have list of Countries and inside it have list of Places. // … public IList<ICountriesDTO> Countries { get; set; } public class CountriesDTO: ICountriesDTO { public IEnumerable<IPlacesDTO> Places { get; set; } I am trying to get list
Continue reading[SOLVED] How can i ignore Uppercase or lowercase in ado.net linq to sql?
Issue i have this query i want the user to search with the name without uppercase or lowercase , how can i do this ? join Materiel in ds.Materiel on Accessoir.id_mat equals Materiel.id_mat join Client in ds.Client on Materiel.Client equals
Continue reading[SOLVED] LINQ to SQL, 'Linq' does not exist in the namespace 'System.Data'
Issue I tried to connect my project to a database, using LINQ to SQL, following a few online guides. I created a simple database Library, added new LINQ to SQL Classes item in the project, named SimpleLibraryDatabase, connected to the
Continue reading[SOLVED] Would you use LINQ to SQL for new projects?
Issue I’ve been investigating what data layer to use for a new web-based project I’m designing and I’m very keen to look at incorporating LINQ to SQL. Its apparent simplicity, flexibility and designer support really appeals and the implicit tie-in
Continue reading[SOLVED] Would you use LINQ to SQL for new projects?
Issue I’ve been investigating what data layer to use for a new web-based project I’m designing and I’m very keen to look at incorporating LINQ to SQL. Its apparent simplicity, flexibility and designer support really appeals and the implicit tie-in
Continue reading[SOLVED] What can I do to resolve a "Row not found or changed" Exception in LINQ to SQL on a SQL Server Compact Edition Database?
Issue When executing SubmitChanges to the DataContext after updating a couple properties with a LINQ to SQL connection (against SQL Server Compact Edition) I get a “Row not found or changed.” ChangeConflictException. var ctx = new Data.MobileServerDataDataContext(Common.DatabasePath); var deviceSessionRecord =
Continue reading[SOLVED] What can I do to resolve a "Row not found or changed" Exception in LINQ to SQL on a SQL Server Compact Edition Database?
Issue When executing SubmitChanges to the DataContext after updating a couple properties with a LINQ to SQL connection (against SQL Server Compact Edition) I get a “Row not found or changed.” ChangeConflictException. var ctx = new Data.MobileServerDataDataContext(Common.DatabasePath); var deviceSessionRecord =
Continue reading