↓ Skip to main content

LINQ2SQL

How to Rank your search results with multiple search terms using LINQ and EntityFramework

·2 mins
I have always used a ranked search criteria, it’s the only true way to get good results back from a data set. But I’ve been doing my ranking within C# code. But this got all the data from the data source and then ranked the results. This is very poor on performance, as we should only be returning back the results for the page size we require.

ILinqRepository at last

·4 mins
LINQ to SQL is a very easy to use and very powerful tool for many things when dealing with SQL. But the time has come that I need to wrap it all up and use an iRepository pattern. I’ve Googled for the IRepository and found a few useful references but none that will complete my picture. How ever I did get some good ideas when looking around othe rimplementation of the IRepository pattern that others had implmented.

Transaction scoping within Linq to Sql

·1 min
If you are like me and us are using an IRepository for Linq to SQL you’ll probably at some point need to be able to generate a Transaction. As the IRepository saves records as it goes and not on a SubmitChanges() we’re going to have to use the Microsoft TransactionScope Class, from the System.Transactions (in System.Transactions.dll), which makes a code block transactional.

Using LINQ to SQL

·1 min
Found these great articles on LINQ to SQL, well worth reading as it the way to go forwards Using LINQ to SQL (Part 1) LINQ to SQL (Part 2 – Defining our Data Model Classes) LINQ to SQL (Part 3 – Querying our Database)