Home
Contact
Blog
Articles on this page...
Archives
<
February 2012
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
1
2
3
4
5
6
7
8
9
10
Aggregation:
Categories
Blogging (2)
Development (10)
Hardware (7)
MySQL (3)
Server Administration (2)
SSD (2)
Storis (1)
UniData (1)
Virtualization (1)
Windows 7 (5)
Windows Mobile (1)
October, 2009 (2)
June, 2009 (2)
May, 2009 (3)
March, 2009 (4)
February, 2009 (3)
December, 2008 (4)
November, 2008 (4)
Blogging
Development
Hardware
MySQL
Server Administration
SSD
Storis
UniData
Virtualization
Windows 7
Windows Mobile
Blogroll
Scott Hanselman
Pick a theme:
BlogXP
business
calmBlue
Candid Blue
Continuum
dasBlog
dasblogger
dasblueblog
dasEmerald
DirectionalRedux
Discreet Blog Blue
Elegante
essence
Just Html
MadsSimple
Mobile
Mono
Movable Radio Blue
Movable Radio Heat
nautica022
orangeCream
Portal
Project84
Project84Grass
Slate
Sound Waves
Tricoleur
useit.com
Voidclass2
Sign In
Tuesday, October 27, 2009
« Baskin Robbins I Fixed Your Logo For You...
|
Main
|
PLINQO is the best way to use LINQ to SQL
LINQ to SQL is a great idea. It's a fast and easy way to generate a data layer from your SQL schema. With just a few clicks, you can have entity classes generated that you can then query from a repository class (or however you roll).
But what happens when your schema changes? You have to drop your LINQ entities from the diagram and re-add them. Any customizations you have made will be lost. And there are some other pitfalls:
Many-to-Many relationships are not supported
All your entities are defined in a single, monstrous class
You have to fetch records from the database just to delete or update them
There is no built-in caching
I was griping about this and someone told me about PLINQO.
PLINQO
is a set of templates for
CodeSmith
. There are a couple videos you can watch on
www.plinqo.com
that explain how to use it. It's pretty easy! You can do the whole thing in under a minute. I had never used CodeSmith or even heard of PLINQO but I figured it all out from watching the videos a few times.
PLINQO offers:
Many-to-Many support
Entities get their own class files
Changes to your SQL schema are magically preserved when you update your classes
Deletes and updates are optimized
You can detach and reattach entities
You can generate astoria services for EASY use with jQuery ajax (sweet!)
MUCH MORE
If you like LINQ to SQL but are looking for a way to overcome its shortcomings, PLINQO is definitely the way to go. I have been using it for several months now on multiple projects, and I am very happy with it!
Development
Tuesday, October 27, 2009 12:03:53 PM (Central Standard Time, UTC-06:00)
Comments [0]
Related posts:
Baskin Robbins I Fixed Your Logo For You
Remote Desktop Connection Does Not Remember Window Size or Position
MySQL ODBC Slow - Caused by Nod32 4.0
Edit Text in a .NET Assembly
Escape MySQL Queries in .NET (C#)
How To Get Storis / UniData Data From a C# .Net Application (or just about anything) via ODBC in Windows
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page
Remember Me
Comment (Some html is allowed:
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u
) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.
Enter the code shown (prevents robots):
Live Comment Preview
Copyright © 1998 - 2008, Continuum Concepts, LLC.
Phone: (214) 564-2608. Fax: (435) 304-1859. Email:
chris@continuumconcepts.com