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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:06:55+00:00 2026-06-16T02:06:55+00:00

I have an MVC3 app which is using POCO classes separated into distinct layers.

  • 0

I have an MVC3 app which is using POCO classes separated into distinct layers. I have implemented a generic repo pattern as well.

I have a dashboard which uses Kendo UI charts for management to view real time stats. As the database is growing the dashboard is slower and slower. I found these reasons:

  1. Records grow daily
  2. Each chart calls to the repo to get all the rows to calculate stats with LINQ
  3. Automapper is creating my model to viewmodels

I would like to speed this up by using stored procedures in the database to get exactly the numbers I need for stats. I am not sure how I should implement this… even though it feels so wrong! Any tips?

Example Controller with Repo code

Public Class DashboardController
    Inherits BaseController

    Private ticketRepo As MaintenanceTicketsRepository

    Public Sub New()
        Me.ticketRepo = New MaintenanceTicketsRepository(New TicketContext)
    End Sub

    Function Chart_OpenItems() As ActionResult
        Dim tickets As IList(Of MaintenanceTicket) = ticketRepo.GetAll().Include(Function(p) p.Priority).Include(Function(s) s.Status).OrderBy(Function(o) o.PriorityId).ToArray()
         'Do some work with repo then dispose'
    End Function

    Function Chart_ClosedItems() As ActionResult
        Dim tickets As IList(Of MaintenanceTicket) = ticketRepo.GetAll().Include(Function(p) p.Priority).Include(Function(s) s.Status).OrderBy(Function(o) o.PriorityId).ToArray()
         'Do some work with repo then dispose'
    End Function
End Class
  • 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-06-16T02:06:57+00:00Added an answer on June 16, 2026 at 2:06 am

    Trying to answer your question. If you can reduce the amount of data going to your Model by using a stored procedure to aggregate the data before it leaves SQL Server then go for it. The actual implementation details will depend on what kind of ORM setup you have. If you can reduce the 1800 rows to >100 you will almost certainly see a speed increase.

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

Sidebar

Related Questions

I have an asp.net app which needs to log users into Active Directory using
I have an MVC3 web app to which I want to start using whole
I have an MVC3 app which was using EF CTP5. After upgrading to EF
I'm developing a ASP.Net MVC3 app which will have few hundred videos. I want
I have an MVC3/EF4.1 app that I'm building which now works fine on my
I have an MVC3 web app which is effectively 'bolted on' to a classic
I have an MVC3 web app via which users upload text files to the
I'm working on an ASP.NET MVC app (using MVC3 RC2). Say I have 2
Have an ASP.NET MVC3 app with model validation using FluentValidation . User enters some
I have a .net app which has an MVC3 front end and 2 windows

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.