---
title: "Storing Data in Custom Class"  
description: "Storing Data in Custom Class"  
author: "Samuel Fernandes"  
published: 2017-12-15  
updated: 2017-12-18  
canonical: https://www.mindstick.com/forum/34403/storing-data-in-custom-class  
category: "c#"  
tags: ["c#", "asp.net", "asp.net mvc", "mvc"]  
reading_time: 2 minutes  

---

# Storing Data in Custom Class

I [am facing](https://answers.mindstick.com/qa/37099/if-i-am-facing-my-thoughts-while-meditating-am-i-meditating-wrong) [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) in storing [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) in [custom](https://www.mindstick.com/blog/12298/use-custom-writing-services-to-get-through-the-finals) [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp)

```
 public class DashboardModel
    {

        public long TotalArticle { get; set; }
        public long UnApprovedArticle { get; set; }
        public long TotalBlog { get; set; }
        public long UnApprovedBlog { get; set; }
        public long TotalUser { get; set; }
        public long LockedUser { get; set; }

    }
```

## Replies

### Reply by Manish Kumar

```
 DashboardModel model = new DashboardModel
            {
                TotalArticle = _uow.Articles().Select(f => f.ID).Count(),
                UnApprovedArticle = _uow.Articles().Where(x => !x.IsApproved).Count(),
                TotalBlog = _uow.Blogs().Select(f => f.ID).Count(),
                UnApprovedBlog = _uow.Blogs().Where(x => !x.IsApproved).Count(),
                TotalUser = _uow.MindstickUsers(type).Count(),
                LockedUser = _uow.MindstickUsers(type).Where(x => !x.IsActive ?? true).Count()

            };
```

you can use custome class like this..hope it help you..

\

\


---

Original Source: https://www.mindstick.com/forum/34403/storing-data-in-custom-class

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
