Home /

| RSS

Insert Master Detail Data With LINQ To SQL

Best thing about running One .Net Way is interaction with members of developer community. I thoroughly enjoy answering questions which come my way through this site. Early in the morning today I saw a question by Joey. To avoid loosing details in paraphrasing, here is the exact question asked by Joey.
I’m new to LINQ. If [...]

[ More ] July 8th, 2009 | 8 Comments | Posted in Programming |

Select Max Value With LINQ To SQL

Today I was asked a question by a developer on my team. The question is “How do you select MAX value for a column in a table with LINQ To SQL?”. I will try to answer the question in this post with an example. Let’s say that we want to retrieve maximum unit price from [...]

[ More ] July 7th, 2009 | 2 Comments | Posted in Programming |

Create T-SQL CASE Statements With LINQ To SQL

I was recently helping Nosh with a LINQ To SQL query where he wanted the resulting T-SQL query to have CASE statements. Having CASE statements in T-SQL queries is a common scenario but how do we it in LINQ To SQL .After some investigation I found the solution which I am presenting here using an [...]

[ More ] March 24th, 2009 | 1 Comment | Posted in Programming |

SQL Server 2008 – Get Space Used By a Table

You can easily get information on how much space a table is using by executing sp_spaceused stored procedure. Executing the following query on AdventureWorks database shows me how much space Person.Contact table is using. Information presented is detailed which includes the number of rows, reserved space, index size, space used by data and any unused [...]

[ More ] February 23rd, 2009 | No Comments | Posted in Programming |