title: need thoughts on my interview question - .net, c#
body: <p>One of the questions I was asked was that I have a database table with following columns</p>
  
  <pre><code>pid - unique identifier
  orderid - varchar(20)
  documentid - int 
  documentpath - varchar(250)
  currentLocation - varchar(250)
  newlocation - varchar(250)
  status - varchar(15)
  </code></pre>
  
  <p>I have to write a c# app to move the files from currentlocation to newlocation and update status column as either 'SUCCESS' or 'FAILURE'.</p>
  
  <p>This was my answer</p>
  
  <ol>
  <li><p>Create a List of all the records using linq</p></li>
  <li><p>Create a command object which would be perform moving files</p></li>
  <li><p>using foreach, invoke a delegate to move the files - </p></li>
  <li><p>use endinvoke to capture any exception and update the db accordingly</p></li>
  </ol>
  
  <p>I was told that command pattern and delegate did not fit the bill here - i was aksed to think and implement a more favorable GoF pattern. </p>
  
  <p>Not sure what they were looking for - In this day and age, do candidates keep a lot of info on head as one always has google to find any answer and come up with solution.</p>