added example code for entity framework