April 2010 Entries
Sometimes you think you know and then when you go and open your big mouth and make a fool of yourself. I generally script all my database changes by hand. Not 100%, if it’s a big change I’ll right-click the object and use the script menu command to generate a script I can paste into my script editor. But often if I’m creating new objects I’ll write the script by hand from scratch. Last week I needed to add a column to three separate tables and the column was not nullable. So as I have...
I’ve been reading up on Domain-Driven Design (DDD) lately and I’ve checked out Jimmy Nilsson’s book Applying Domain-Driven Design and Patterns: With Examples in C# and .NET. I was reading Ch 5, “Moving Further with Domain-Driven Design” and Jimmy is talking about reconstituting your entity from persistence. Specifically, he’s talking about the situation where your entity has read-only fields that must be provided by your persistence layer, but that you don’t want to make public. For example, the entity’s ID field. This is definitely a read-only field, but you have to set it at some point when querying...