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!

715 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
  221. Pingback: akmeologiya
  222. Pingback: dizain cheloveka
  223. Pingback: human-design-hd
  224. Pingback: rxtrustpharm
  225. Pingback: casodex otc
  226. Pingback: catapres cheap
  227. Pingback: cephalexin otc
  228. Pingback: claritin pharmacy
  229. Pingback: casino slots
  230. Pingback: slots online
  231. Pingback: usaa car insurance
  232. Pingback: batmanapollo
  233. Pingback: Pharmacy viagra
  234. Pingback: easy payday loans
  235. Pingback: tsoy
  236. Pingback: cbd oil for pets
  237. Pingback: wikipedia tablet
  238. Pingback: bill gates cbd oil
  239. Pingback: get viagra online
  240. Pingback: 44548
  241. Pingback: 44549
  242. Pingback: hod-korolevy-2020
  243. Pingback: online homework
  244. Pingback: HD
  245. Pingback: how to buy cleocin
  246. Pingback: 158444
  247. Pingback: Cost of viagra
  248. Pingback: clonidine cheap
  249. Pingback: Viagra brand
  250. Pingback: order coreg
  251. Pingback: 38QvPmk
  252. Pingback: matrica-film
  253. Pingback: dzhonuikfilm4
  254. Pingback: order cymbalta
  255. Pingback: dapsone caps price
  256. Pingback: order ddavp
  257. Pingback: Viagra best buy
  258. Pingback: depakote 125 mg uk
  259. Pingback: 1444
  260. Pingback: how to buy geodon
  261. Pingback: imdur otc
  262. Pingback: cheap cialis
  263. Pingback: imitrex canada
  264. Pingback: canadian viagra
  265. Pingback: viagra ingredients
  266. Pingback: our website
  267. Pingback: redirected here
  268. Pingback: imuran for sale
  269. Pingback: lopid 300mg prices
  270. Pingback: macrobid tablet
  271. Pingback: buy viagra gel
  272. Pingback: cleantalkorg2.ru
  273. Pingback: 232dfsad
  274. Pingback: viagra in 2 days
  275. Pingback: prevacid price
  276. Pingback: cheapest protonix
  277. Pingback: cost of reglan
  278. Pingback: join vk
  279. Pingback: vk login
  280. Pingback: toprol 25mg uk
  281. Pingback: tricor cost
  282. Pingback: valtrex cost
  283. Pingback: wellbutrin otc
  284. Pingback: see
  285. Pingback: site web
  286. Pingback: sildenafil nz
  287. Pingback: tadalafil coupon
  288. Pingback: svaty—7—sezon
  289. Pingback: svaty 7 sezon
  290. Pingback: svaty 7
  291. Pingback: anastrozole 1mg uk
  292. Pingback: cefuroxime otc
  293. Pingback: celecoxib tablet
  294. Pingback: 141genericExare
  295. Pingback: 141generic2Exare
  296. Pingback: epcohmxt
  297. Pingback: tik tok
  298. Pingback: alendronate uk
  299. Pingback: how to get viagra
  300. Pingback: clubhouse invite
  301. Pingback: metoprolol online
  302. Pingback: img
  303. Pingback: img1
  304. Pingback: doxycycline dosage
  305. Pingback: diflucan for dogs
  306. Pingback: synthroid insomnia
  307. Pingback: 666
  308. Pingback: purchase propecia
  309. Pingback: 30 mg sildenafil
  310. Pingback: The Revenant
  311. Pingback: 2021
  312. Pingback: duloxetine dosing
  313. Pingback: duloxetine 20mg
  314. Pingback: sildenafil 58
  315. Pingback: D4
  316. Pingback: 777
  317. Pingback: cost for tadalafil
  318. Pingback: link
  319. Pingback: 4569987
  320. Pingback: news news news
  321. Pingback: psy
  322. Pingback: psy2022
  323. Pingback: projectio-freid
  324. Pingback: kinoteatrzarya.ru
  325. Pingback: topvideos
  326. Pingback: Ukrainskie-serialy
  327. Pingback: site
  328. Pingback: ativan uk buy
  329. Pingback: top
  330. Pingback: cialis nova scotia
  331. Pingback: Lioresal
  332. Pingback: tadalafil online
  333. Pingback: tadalafil 25mg
  334. Pingback: cialis capsule 5mg
  335. Pingback: 20 mg sildenafil
  336. Pingback: otc tadalafil

Leave a Reply

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