Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6559081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:16:43+00:00 2026-05-25T13:16:43+00:00

Just started a ‘real world’ project using .NET MVC, Ninject, PetaPoco and plan to

  • 0

Just started a ‘real world’ project using .NET MVC, Ninject, PetaPoco and plan to use the repository pattern.

I used the PetaPoco T4 template w/ ‘GenerateOperations’, ‘GeneratePocos’, and ‘GenerateCommon’ all = true. Looking at the generated code, it seems to make sense to extract the ‘Record’ class into a generic repository interface and/or class, but I haven’t been able to wrap my head around how to go about it.

With my limited DI knowledge, it also seems to make sense to tie the ‘GetInstance’ piece into Ninject somehow on a ‘per-request’ basis – but how should I go about it?

In case it isn’t apparent already, I’m a newbie to DI, the repository pattern and PetaPoco. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:16:44+00:00Added an answer on May 25, 2026 at 1:16 pm

    I spent a long time over thinking the repo pattern, in the end I decided simple is best..

    The Repo I posted on my blog is not yet complete, but it will give you a good start ( I have made changes since that post.. if you want them I can zip something up).

    I was a little restricted in my implimentation as I was moving from another DA so had to make my PetaPoco repo work in the same way as my previously defined patern.. but it works and thats what the repository patterns all about.

    I’m afraid I’m just learning DI myself so Im not able to help you with that at the moment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started my first MVC 2.0 .net application. And I set up some default
Just started working with .NET and MVC(1). I'm having a problem wherein in my
Just started developing a project using NHibernate and Fluent NHibernate for the mapping and
Just started getting a bunch of errors on our C# .Net app that seemed
Just started to get my feet wet with C# and .NET, liking it so
Just started with JQuery and I've managed to pass a parameter using POST, firebug
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Just started learning to use the grid so please excuse me for the possibly
Just started to realize an augmented reality based project, got GPS location, heading, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.