0

I got a piece of code like follows

    private Models.Quotes QuoteList;

    public SalesOfficeController(Models.Quotes.QuoteType qt ) 
    {
        QuoteList = new Models.Quotes(qt); 
    }

I wanted to pass dynamic enum value(QuoteType) to this constructor. How can I do this. Error I'm getting here is "No parameterless constructor defined for this object" since I haven't implemented DI. Is there any other straight forward method to achieve this without using DI.

ninja
  • 3
  • 4
  • what's the point of doing this? Are you creating this controller class yourself? Controllers are supposed to be instantiated by framework, not yourself... – driushkin Jul 05 '11 at 10:45
  • QuoteList is a dynamic list of rows needs generating from DB.Since this is too large to fit to one page it involves paging. – ninja Jul 05 '11 at 11:00

0 Answers0