title: Entity Framework : Create a model from Dictionary<TKey,TValue> to be mapped to a database table
body: <p>Earlier I had a table named ApplicationConfiguration which simply had [Key],[Value] columns to store some config data. This was queried straight away using SQL queries.</p>
  
  <p>Now I intend to make use of Entity Framework (EF) Code First approach to query this table. The specialty of this table is that the table will have only a fixed number of rows in its lifetime. Only the Value column can be updated.</p>
  
  <p>So as per the code first approach, we have to first write our POCO classes with its properties that will be mapped to columns in the underlying table. However, I wish to have a Dictionary&lt;> structure to represent these configuration KV pairs. My concern is, will EF be able to fire update queries against any updation to the the value of a particular pair.</p>
  
  <p>Also since I am using Code First approach, I would want some seed data(i.e the fixed number of rows and its initial content) to the added after the table itself is created on the fly when the application is first executed.</p>
  
  <p>If Dictionary&lt;> cannot be used, please suggest some alternative. Thanks in advance.</p>