Blog posts page 10 of 44

LINQ to SQL resources

  • πŸ“…
  • πŸ“ 723
  • πŸ•™ 4
  • πŸ“¦ .NET

A quick round-up of some useful LINQ to SQL related resources that are available for developers. I’ve not used everything on this list myself so don’t take this as personal endorsement.

Note: While the T4 templating language is built-in to Visual Studio 2008/2010 it does not come with syntax highlighting or IntelliSense. Check out either:

Font hinting and instructing – a primer

Taking my bitmap font Envy Code B into the vector TrueType Envy Code R was a long process, the most difficult being hinting.

Bitmap fonts are incredibly easy to make. Using a program like Softy or BitFonter you decide the size of your letters and start plotting pixels. You can see exactly how it will look because you draw every glyph (letter/symbol/number) in every size you want to support. This can obviously be very time consuming and doesn’t let you take full advantage of the resolution of the device and the capabilities it offers. A printer can handle in excess of 300 dpi while a display is typically 72 dpi (Mac) or 96 dpi (Windows) with LCD’s supporting sub-pixels due to the individual layout of the red-green and blue elements you can’t feasibly pre-plot every single combination and even if you could the file size would be rather large.

LINQ to SQL tips and tricks #2

  • πŸ“…
  • πŸ“ 534
  • πŸ•™ 3
  • πŸ“¦ .NET
  • πŸ’¬ 4

A few more useful and lesser-known tips for using LINQ to SQL.

There are times when LINQ to SQL refuses to cook up the TSQL you wanted either because it doesn’t support the feature or because it has a different idea of what makes an optimal query.

LINQ to SQL tips and tricks #1

  • πŸ“…
  • πŸ“ 534
  • πŸ•™ 3
  • πŸ“¦ .NET
  • πŸ’¬ 4

Being on the inside of a product team often leads to uncovering or stumbling upon lesser-known techniques, and here are a few little nuggets I found interesting – I have more if there is interest.

LINQ to SQL lets you specify that a property is delay-loaded, meaning that not retrieved as part of normal query operations against that entity. This is particularly useful for binary and large text fields such as a photo property on an employee object that is rarely used and would cause a large amount of memory to be consumed on the client, not to mention traffic between the SQL and application.

Multiple outputs from T4 made easy

  • πŸ“…
  • πŸ“ 972
  • πŸ•™ 5
  • πŸ“¦ .NET
  • πŸ’¬ 14

An improved version is now available.

One of the things I wanted my LINQ to SQL T4 templates to do was be able to split the output into a file-per-entity. Existing solutions used either a separate set of templates with duplicate code or intrusive handling code throughout the template. Here’s my helper class to abstract the problem away from what is already complicated enough template code.

LINQ to SQL templates updated, now on CodePlex

  • πŸ“…
  • πŸ“ 212
  • πŸ•™ 1
  • πŸ“¦ .NET
  • πŸ’¬ 12

This post is over 10 years old. These templates are no longer maintained and the information may be outdated.

My templates that allow you to customize the LINQ to SQL code-generation process (normally performed by SQLMetal/LINQ to SQL classes designer) have been updated once again.

ALT.NET Seattle

One of the cool things about living in Seattle is the sheer number of passionate developers around. Whether you’re dropping into offices, heading across campus for lunch, meeting downtown for music and beer or, in my case, last month taking a Saturday out to participate in ALT.NET Seattle, there are ideas, enthusiasm and discussions with great developers to be had everywhere.

The ALT.NET event was interesting. If you didn’t already know the name encapsulates: