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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:04:25+00:00 2026-05-23T11:04:25+00:00

I have created sample Movie application from http://www.asp.net/mvc in this sample application contain Single

  • 0

I have created sample Movie application from http://www.asp.net/mvc in this sample application contain Single Layer. But I would like to make 3 Layer applications are DataLayer, BusinessLayer and WebLayer.

Is anybody has idea for that?

Any answer or suggestion would be appreciated!

Thanks,
Imdadhusen

  • 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-23T11:04:26+00:00Added an answer on May 23, 2026 at 11:04 am

    You can use any of the new MVC wizards in Visual Studio to create your MVC application. This would become the UI layer. You can name this project, for example, Movie.UI. Once you do this, you can go to File | Add | New Project… and add a class library project for your data access layer. You can name this project Movie.Data. You then repeat this step, and add another class library project to your solution, which will be for your business logic layer (i.e. Movie.Business).

    Once you have all three projects in your solution, you add the necessary references between them. Normally your UI project will reference your business layer project, and your business layer project will in turn reference your data access project.

    Update

    This communication you are referring to is precisely what you achieve by referencing a project. When you add a reference from project A to project B, you establish a way for project A to access public types from project B.

    I’ve set up the simplest possible sample I could come with to show how to communicate between projects:

    In your Movie.Data project, you add a MovieRepository class:

    MovieRepository.cs

    namespace Movie.Data
    {
        public class MovieRepository
        {
            public string[] GetMovies()
            {
                return new[] 
                { 
                    "Gone with the Wind", 
                    "Back to the Future", 
                    "The Godfather", 
                };
            }
        }
    }
    

    Then in your Movie.UI project, you first need to add a reference to your Movie.Data project:

    1. Right click on References
    2. Click on Add Reference…
    3. Under Project References you select Movie.Data

    Finally, your Movie.UI project (for simplicity I made it a console app):

    Program.cs

    using System;
    using Movie.Data;
    
    namespace Movie.UI
    {
        class Program
        {
            private static MovieRepository _repo = new MovieRepository();
    
            static void Main(string[] args)
            {
                foreach (var movie in _repo.GetMovies())
                {
                    Console.WriteLine(movie);
                }
            }
        }
    }
    

    Hope this helps.

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

Sidebar

Related Questions

I have created a sample java socket application. I used Socket s = new
I have created a simple Asp.Net custom control which automatically combines all the correct
I have just changed my WPF application from .Net3.5 to .Net4. Doing this caused
I have created a sample report with crystal report 10. Now, I wanna to
Could someone help me on this, I have created simple web services using axis2
i have done developed a sample application with the help of tutorials posted on
I have created a simple application which has a scroll bar. The scroll bar
How to manually create Friendly URLs? (PHP) So I have created simple php file
I have created a simple wcf service which used the WCF Service Library template.
I have created a simple grid of divs by left floating them and an

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.