January 2010 Entries
Well, OK I’m over dramatizing it a tad :) As you may have noticed from my last post I’ve started working of some stuff which is outside my comfort zone. I recently joined a company called cozwecan,working for a chap named @RobertTheGrey, the first project we’re working on is a photo sales site…you know kind of like Getty Images / Smugmug / Flickr except for direct photographer-customer sales. As the only full-time developer (so far!) I’ve been tasked with building the vast majority of the applications (be they web, desktop, etc…) which we need for the business to work. ...
UPDATE: Thanks for all those who commented on this. Turns out the problem was pretty simple. You just have to get rid og the ‘FileId’ and ‘DirectoryId’ properties. They’re ONLY for navigation so cannot be in the entity as fields too…easy peasy :) I like EF, conceptually and in practice it’s pretty nice. EF4 adds a lot of the missing goodness. There’s one thing which ALWAYS stumps me in EF 3 though…this VERY simple paradigm… Given this class layout (generated from a SQLLite DB) See the little 0..1->* relationship? Should...
Thought I’d just post some dumb little utility classes that I had hanging about in my code repository (and always end up trying to find). They’re just little utility classes for finding out image format / extensions / content types for various images…(and before any smartass pipes up, yes much of this info is in registry…but this is intended for use where I can’t access that) public static class Imaging
{
public static string GetContentTypeByImageFormat(ImageFormat format)
{
...