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

  • Home
  • SEARCH
  • 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 3969038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:54:56+00:00 2026-05-20T03:54:56+00:00

I have an MVC2 application with the following classes: -OrderModel -LineOrderModel -OrderController -LineOrderController In

  • 0

I have an MVC2 application with the following classes:

-OrderModel

-LineOrderModel

-OrderController

-LineOrderController

In the OrderController class I’m recollecting some values of a web form . Until now, I created instances of each order line (LineOrderModel class) and OrderClass inside of the Controller.

I was trying to create a OrderFacade class in order to encapsulate the different things to do when creating an order.

So in that class I created a method like this:

public void saveOrder(int idProvider,decimal? price)
        {
            // Here I create instances of OrderModel and LineOrderModel
            // and assign their properties
        }

but my problem is I don’t know how to pass all the order lines captured from the web form.

I think it doesn’t make sense to create and pass to that method a List with orderLines class (because the point of this is to operate with the Facade, not with the class directly)

How could I encapsulate the different lines (all with properties like numberUnits,idProduct …) into a List of generic objects, each one with these properties?

Maybe something like a List<List<object>> ?

Thanks in advance!

  • 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-20T03:54:57+00:00Added an answer on May 20, 2026 at 3:54 am

    Sounds like you don’t need facade. Facade would be good choice if you use data transfer objects (DTOs) between your business logic and application logic (controllers) – in such scenario DTOs can also be view models (I guess orthodox MVC developers will don’t like this idea). Facade would take DTOs and convert them into some business or domain objects.

    But in your scenario you simply need to fill data directly to your model classes – that is purpose of view model classes to use them in views and controllers. Using any kind of property bags to transfer data from controller to business logic is not a nice solution.

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

Sidebar

Related Questions

I have created a new MVC2 project using the ASP.NET MVC2 Web Application, which
I have an application architecture which has following layers (or c# projects). web front
In my ASP.NET MVC2 application, I have a ViewModel class called UserCreateViewModel. In this
I have an Asp.net MVC2 web application. I built the application using VS2008 and
In my MVC2 application I have an AccountController class inherited from Controller . I
I have an MVC2 n-tier application (DAL, Domain, Service, MVC web) using a DDD
I have an MVC2 application, and HttpHandler Library. The library, to simplify, serves an
I have a mvc2 application with a view like this <% using (Ajax.BeginForm(UserApprove, new
I have an asp.net mvc2 application that is using StructureMap 2.6 and NHibernate 3.x.
I have installed VS2010 and MVC2 and testing a simple form using tinyMCE. When

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.