Everything you said makes sense and I'm good to go with the mocking, but I'm questioning when my app expects actual data. I don't want to spend the time writing collections of lookup data, only to have to later write a script to insert the same data into a DB.
I was thinking there was some initialization script to add the data to SQL lite during development time, then use the same script for populating a prod DB. Anybody doing anything like that? On Jul 11, 3:14 pm, Niclas Pehrsson <[email protected]> wrote: > I'm in a project there we are doing just that, we are using interfaces > and mocks. > > For example if you are working with articles you may have an > IArticleService with some methods > > IArticleService.GetAll(); > IArticleService.GetByArticleNumber(string articleNumber); > IArtilceService.Persist(Article article); > > If you are using dependency injection you just register an mock > implemmentation of this interface, which you work with under > construction of your application, > when its time to think of db or wcf service or something else you > implement the real service that goes to the database or wcf service. > > But when you use NHibernate you can just regenerate your db. > > On Jul 10, 3:40 pm, Corey Coogan <[email protected]> wrote: > > > > > I've read about and heard some people talking about how they will > > create entire projects using NH and save the database generation until > > dead last. That sounds very interesting and can be done easily with > > the Schema Export, but I'm unclear how to actually accomplish this. > > > Specifically, I'm confused about how to debug your application if it > > has drop down lists, settings, etc. that are table driven? How would > > I populate SQL Lite during run time and still be able to leverage that > > data when I implement my production database? > > > Any advice is greatly appreciated. > > > Corey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
