Shawn Weisfeld

I find when I talk to myself nobody listens. - Shawn Weisfeld
posts - 365, comments - 180, trackbacks - 34

My Links


Shawn Weisfeld's Facebook profile

The views expressed in this blog are mine and mine alone, not that of my employer, Microsoft, or anyone else’s. No warrantee is given for the quality of any material on this site.


Post Categories

January 2013 Entries

Zebra Strip a jqGrid

  Zebra striping, or greenbar, or odd/even row highlighting whatever you call it, your boss asked you for it and now you are here and you are trying to figure out how to implement it. When I was attempting to do this I saw many examples using javascript to do this, however why do in javascript what you can do in CSS. If you look for a solution for a standard html table (of which there are millions on the web) they will tell you to do something like this:     #grdResults tr:nth-child(even) {             background-color:rgb(226, 228, 240);         } While this works great for...

posted @ Wednesday, January 23, 2013 9:05 PM | Feedback (0) |

Use ASP.NET MVC as a template engine

Get the code here: Got a question today from a colleague. He had a database full of records, lets say customers, and needed to generate static html document for each customer. I did not ask him why he needed the static html, but let’s assume that he was going to use it as the body of an email message. After doing a bunch of thinking I was disappointed that I could not use the power of the MVC template-ing engine, razor. Or could I. What if I wrote a view that pulled a customer from the database...

posted @ Tuesday, January 22, 2013 8:34 PM | Feedback (0) |

Entity Framework insert performance

While I am big believer in Entity Framework (EF) there are some cases where dropping down to raw ADO.NET make sense. In an application I am working on I need to insert thousands of records into the database, and while the change tracking mechanism and other features in EF provides a great service sometimes the overhead of it doesn’t outweigh the benefits it offers. I threw together a quick little sample app (you can download it from GitHub here) that shows the problem. The app simply creates a bunch of random customer objects and saves them to sql server. Here...

posted @ Thursday, January 17, 2013 12:28 PM | Feedback (0) | Filed Under [ SQL ]

Powered by: