Shawn Weisfeld

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

My Links

News


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.

Archives

Post Categories

July 2011 Entries

Auditing with Entity Framework

Also take a look at the new logging stuff added to EF 6 http://msdn.microsoft.com/en-us/data/dn469464.aspx  I was investigating techniques to do auditing and think this is going to fit my needs, thought I would share. . . . Let me start by saying there are about 1000 examples similar to this on the web. However none of the examples I found meet my specific requirements. First lets discuss the requirements: I need to be able to apply auditing to only some of the types in my system I need to be able to ignore some...

posted @ Tuesday, July 26, 2011 10:29 AM | Feedback (2) |

.NET Micro comes to Dallas

  I had a great time at the event today and wanted to thank a few folks that helped make this event: Paul (http://webpaul.net) for leading the discussion Barrie, Ian, Melissa, Kyle & the rest of the Improving (http://www.improvingenterprises.com) for letting us in there office Todd & Rob for helping during the labs The folks at GHI for the prize donations (http://www.ghielectronics.com) All the all the attendees. What is next? How about the Kinect? http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/   ...

posted @ Saturday, July 23, 2011 3:12 PM | Feedback (0) | Filed Under [ NETMF ]

LINQ Between

  Last night at the Dallas .NET UG (http://www.ddnug.net/) Corey Smith (http://addressof.com) demoed a between extension method in VB.NET. I threw together this version for C# for your enjoyment   All it is doing is wrapping the built in Where LINQ method . . . As you can see that it will work on any type that implements IComparable (http://msdn.microsoft.com/en-us/library/system.icomparable.aspx). IComparable is used in .NET for ordering and sorting, just what we need!   Here is how you would call him: As you can see there is an...

posted @ Friday, July 22, 2011 9:25 AM | Feedback (0) |

Entity Framework Code First: Executing SQL files on database creation

  Many times you want to seed data into your DB but don’t want to put all that seed data into your code files, or perhaps you want to add stored procedures, triggers or make other database changes after code first creates your database. While I would argue that the latter impacts one of the “goals” of EF Code First (i.e. centralizing your business logic in one spot), I can see where it might have value. So lets see how we can achieve this mission. Lets start by creating our data objects. I am going to create...

posted @ Friday, July 15, 2011 8:33 AM | Feedback (6) |

Partial Classes VB vs C#

Stumbled across this during a discussion of RIA services today. . . . Apparently in VB you can have the “partial” modifier on only 1/2 of a partial class. However in C# you are required to put the partial modifier on both halves of the class. I will let you guys argue about what way is better. . . . I think that both have merits. . .

posted @ Monday, July 4, 2011 2:41 PM | Feedback (1) |

Powered by: