0

I am new to Design Patterns and referring to a book by Scott Millet : Professional ASP.NET Design Patterns.

In the chapter where it discusses "Separation of Concerns", I have added projects accordingly in the Solution Explorer:

enter image description here

Though the book shows examples of Linq2SQL, I want to use PetaPoco Micro-ORM. I therefore installed PetaPoco via Nuget but I am not following whether to add PetaPoco to all the projects or only in the Model and WebUI Project.

This is how NuGet asks for confirmation while adding PetaPoco to projects:

enter image description here

RKh
  • 13,818
  • 46
  • 152
  • 265

1 Answers1

0

You only need it in one project - the Repository one looks like the best candidate in your solution.

Rikalous
  • 4,514
  • 1
  • 40
  • 52
  • Will it be available to other projects as well? – RKh Sep 06 '12 at 08:06
  • The repository should act as your gateway to the data, you shouldn't need to use PetaPoco in the other projects. In your Model project, you can create classes that use the Repository objects. You can use LINQ on these to process (filter, sort etc) because they are IEnumerable. – Rikalous Sep 06 '12 at 08:48
  • But in the Model, I want to use PetaPoco T4 Templates to generate model from the database. – RKh Sep 07 '12 at 06:59