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 6114797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:01:05+00:00 2026-05-23T15:01:05+00:00

First I decided to create one Interface called it IDataAccessLayer and started putting everything

  • 0

First I decided to create one Interface called it IDataAccessLayer and started putting everything into it: methods like GetUsers(), GetUser(int id), GetOrderByNumber(int number), DeleteOrder(int Id) etc.

That worked just perfect at first. But then I realized that the concrete implementation of DataLayer:IDataLayer is growing to big. I decided to cut it into several partial class files. Still I was feeling that I’m doing something really wrong.

Then I decided to create interfaces for each logical part like IUsers, IOrders, IItems etc. Didn’t work, because I was accessing repository through one dependent property injected into controller’s constructor. So I couldn’t just add another property everytime I need to use different type of dataContext in my controller.

Then after many hours reading through articles about Entity Framework, I finally realized that I have to use Repository and Unit of work patterns. And still I need to somehow separate POCOs from my ViewModel objects, although almost all the time they’d be sharing similarities. Automapper helps a lot. But now, I’m not sure how to use everything together. Entity Framework, Patterns, Automapper and Dependency injection framework like Ninject.

I don’t have clear understanding how to mix that all into one awesome architecture. Can you please show me some nice examples.

  • 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-23T15:01:05+00:00Added an answer on May 23, 2026 at 3:01 pm

    First here is an overall article about n-tier architecture using the Repository and UnitOfWork principles: link. I have some experience working with EF and the afore mentioned patterns and I found this article of great help.

    Take a look here as well as here for the MSDN articles on those principles.

    Regards.

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

Sidebar

Related Questions

newbie here, first post. I just spent like 4 hours trying to assign one
So I decided to start using prototype and here's my first question. I'm trying
A little background first: I'm a designer/developer and decided to use subversion for a
This is the first time I'm creating an open-source project, and I've decided (based
First off, I understand the reasons why an interface or abstract class (in the
I decided to go with a Neural Network in order to create behaviors for
I'm trying to create my first Rails plugin and am having some troubles leveraging
When I started as at my first job as software developer I was assigned
I am new to JSF 2.0 and Primefaces but have decided to create my
One of the practices I have gotten into in Python from the beginning is

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.