Unit Testing while using Entity Framework

I have been recommended to use Entity Framework (EF) instead of LINQ to SQL while building .NET applications. So I pulled out some reference materials, learned the beginning concepts of EF, and started to build an application.

Then I started trying to figure out how to do Unit Testing and Test Driven Development (TDD) while using EF.  What I had read about EF showed me how to build a SQL Server database and then have Visual Studio build the entities for me. I had to design the entire database first and then leave all the classes tied to the database, both of which are incompatible with TDD and Unit Testing.

So I started my Google search, and these are the documents I found really helpful. In the end, Unit Testing and TDD are compatible with EF!  Here is where my journey took me:

TDD and ADO.NET Entity Framework
This late 2008 posting has several people sharing their concerns about using TDD with EF, which is where I was yesterday morning.

Walkthrough: POCO Template for the Entity Framework
Feature CTP Walkthrough: POCO Templates for the Entity Framework
These articles shows how to use the  ADO.NET C# POCO Entity Generator and the Microsoft ADO.NET Entity Framework Feature Community Technology Preview 3 assembly to separate a .edmx Entity Framework file into two groups of classes: the persistence ignorant entity classes (not connected to the database), and the data context class which talks with the database.

Feature CTP Walkthrough: Code Only for the Entity Framework (Updated)

This posting illustrates how to build an EF from code only, without using Visual Studio’s automated generators.  In this process, they were able to keep the persistence ignorant entity classes separate from the database context classes.  This technique required the Microsoft ADO.NET Entity Framework Feature Community Technology Preview 3 assembly.
These articles illustrate how to practically use TDD and EF together!
Now I feel prepared to move forward using Entity Framework together with Test Driven Development methodologies!

360 thoughts on “Unit Testing while using Entity Framework

  1. Pingback: first rate auto
  2. Pingback: description
  3. Pingback: bet365 bonus code
  4. Pingback: buy xanax online
  5. Pingback: Online Sex Store
  6. Pingback: Movers in Atlanta
  7. Pingback: blockchain
  8. Pingback: ¤j¦ë¤p¶Ç
  9. Pingback: 2019 two piece
  10. Pingback: 123movies.pics
  11. Pingback: led displays
  12. Pingback: lebanon news
  13. Pingback: Foot Scrub Brush
  14. Pingback: 바카라사이트
  15. Pingback: 해외축구중계
  16. Pingback: 온라인카지노
  17. Pingback: 바카라
  18. Pingback: 바카라
  19. Pingback: 안전바카라
  20. Pingback: depedtambayan
  21. Pingback: sports relay
  22. Pingback: 온라인카지노
  23. Pingback: we-b-tv.com
  24. Pingback: hs;br
  25. Pingback: tureckie_serialy
  26. Pingback: serialy
  27. Pingback: 00-tv.com
  28. Pingback: +1+
  29. Pingback: watch
  30. Pingback: ++++++
  31. Pingback: HD-720
  32. Pingback: 2020
  33. Pingback: Video
  34. Pingback: wwin-tv.com
  35. Pingback: movies
  36. Pingback: movies online
  37. Pingback: karan johar
  38. Pingback: Top Movies
  39. Pingback: Movies1
  40. Pingback: 11 10 2019
  41. Pingback: Serial smotret
  42. Pingback: kinokrad
  43. Pingback: kinokrad 2020
  44. Pingback: Watch TV Shows
  45. Pingback: casino
  46. Pingback: serial 1
  47. Pingback: serial
  48. Pingback: youtube2019.ru
  49. Pingback: 1 seriya
  50. Pingback: topedstoreusa.com
  51. Pingback: hqcialismht.com
  52. Pingback: myonlinebuy.us
  53. Pingback: lindamedic.com
  54. Pingback: ciaonlinebuy.us
  55. Pingback: See-Season-1
  56. Pingback: genfio.com
  57. Pingback: fioricet2020.com
  58. Pingback: 1plus1tv
  59. Pingback: #1plus1
  60. Pingback: Film 2020
  61. Pingback: human design
  62. Pingback: dizajn cheloveka
  63. Pingback: human-design-space
  64. Pingback: koma 2020
  65. Pingback: The-Gentlemen
  66. Pingback: led-2
  67. Pingback: pod-vodoi
  68. Pingback: vk 2020
  69. Pingback: DSmlka
  70. Pingback: viagra
  71. Pingback: generic viagra
  72. Pingback: +
  73. Pingback: ¯jak Son³k
  74. Pingback: astrolog
  75. Pingback: generic cialis
  76. Pingback: cialis 20mg
  77. Pingback: viagra for sale
  78. Pingback: viagra generic
  79. Pingback: kinoxaxru.ru
  80. Pingback: viagra pills
  81. Pingback: buy cialis
  82. Pingback: cialis
  83. Pingback: buy viagra
  84. Pingback: levitra
  85. Pingback: buy cialis cheap
  86. Pingback: cialis pills
  87. Pingback: strelcov 2020
  88. Pingback: film t-34
  89. Pingback: online pharmacy
  90. Pingback: canadian pharmacy
  91. Pingback: Cialis price
  92. Pingback: sildenafil citrate
  93. Pingback: buy viagra
  94. Pingback: generic cialis
  95. Pingback: cialis generic
  96. Pingback: sildenafil
  97. Pingback: Beograd film 2020
  98. Pingback: viagra online
  99. Pingback: viagra online
  100. Pingback: psiholog
  101. Pingback: cialis online
  102. Pingback: psyhelp_on_line
  103. Pingback: coronavirus
  104. Pingback: PSYCHOSOCIAL
  105. Pingback: buy cialis pills
  106. Pingback: viagra low price
  107. Pingback: viagra
  108. Pingback: cialis 20mg
  109. Pingback: generic viagra
  110. Pingback: levitra dosage
  111. Pingback: cialis from canada
  112. Pingback: Levitra or viagra
  113. Pingback: cbd distillery
  114. Pingback: Us pharmacy viagra
  115. Pingback: film doktor_liza
  116. Pingback: djoker film
  117. Pingback: viagra
  118. Pingback: buy viagra online
  119. Pingback: canadian pharmacy
  120. Pingback: viagra
  121. Pingback: viagra for sale
  122. Pingback: cialis 20mg price
  123. Pingback: viagra
  124. Pingback: kaletra price
  125. Pingback: cheap viagra
  126. Pingback: viagra 50mg
  127. Pingback: viagra 100mg
  128. Pingback: cialis canada
  129. Pingback: viagra generic
  130. Pingback: cialis
  131. Pingback: ed meds online
  132. Pingback: viagra for sale
  133. Pingback: ed meds
  134. Pingback: tadalafil online
  135. Pingback: rx pharmacy
  136. Pingback: t.me/psyhell
  137. Pingback: canada pharmacy
  138. Pingback: Buy cialis online
  139. Pingback: bitly.com
  140. Pingback: viagra price
  141. Pingback: cialis generic
  142. Pingback: generic cialis
  143. Pingback: cheap levitra
  144. Pingback: vardenafil usa
  145. Pingback: cheap levitra
  146. Pingback: viagra pills
  147. Pingback: bitly
  148. Pingback: cash loans
  149. Pingback: viagra
  150. Pingback: pay day loans
  151. Pingback: viagra pills
  152. Pingback: best pills for ed
  153. Pingback: generic for cialis
  154. Pingback: cialis to buy
  155. Pingback: buy cialis
  156. Pingback: kandis loy
  157. Pingback: online casino
  158. Pingback: pharmacy
  159. Pingback: cialis buy
  160. Pingback: buy propecia
  161. Pingback: cialis 20
  162. Pingback: cialis 5 mg
  163. Pingback: online viagra
  164. Pingback: viagra 100mg
  165. Pingback: real casino
  166. Pingback: cbd products
  167. Pingback: online casinos
  168. Pingback: dom 2
  169. Pingback: rivers casino
  170. Pingback: levitra generic
  171. Pingback: real online casino
  172. Pingback: zoom-psykholog
  173. Pingback: zoom-viber-skype
  174. Pingback: discount viagra
  175. Pingback: viagra alternative
  176. Pingback: order viagra
  177. Pingback: natural viagra
  178. Pingback: Vratar
  179. Pingback: Cherkassy 2020
  180. Pingback: tadalafil cialis
  181. Pingback: moskva-psiholog
  182. Pingback: generic for viagra
  183. Pingback: batmanapollo.ru
  184. Pingback: prednisone cost
  185. Pingback: 323
  186. Pingback: 525
  187. Pingback: plaquenil cost
  188. Pingback: dom2-ru
  189. Pingback: best casino online
  190. Pingback: Tenet Online
  191. Pingback: tadalafil
  192. Pingback: casino
  193. Pingback: psy psy psy psy
  194. Pingback: buy cialis
  195. Pingback: Viagra 120mg nz
  196. Pingback: krsmi.ru
  197. Pingback: viagra buy
  198. Pingback: cialis coupon
  199. Pingback: Cialis 60 mg usa
  200. Pingback: buy generic viagra
  201. Pingback: buy viagra online
  202. Pingback: Cialis 60mg nz
  203. Pingback: like-v.ru
  204. Pingback: Cialis 40 mg uk
  205. Pingback: Cialis 80mg cheap
  206. Pingback: rx trust pharm
  207. Pingback: propecia 5mg price
  208. Pingback: cheap lexapro 20mg
  209. Pingback: cheap viagra
  210. Pingback: actos 30mg price
  211. Pingback: CFOSPUK
  212. Pingback: MAMprEj
  213. Pingback: fgu0ygW
  214. Pingback: amaryl 2mg online
  215. Pingback: cialis online
  216. Pingback: cost of arava 10mg
  217. Pingback: order real viagra
  218. Pingback: sildenafil dosage
  219. Pingback: buy generic cialis
  220. Pingback: Biaxin 500 mg usa

Leave a Reply

Your email address will not be published. Required fields are marked *