Monday

Software Review - Stellar Phoenix SQL Database Repair

While the database is in Suspect mode, no transactions are possible till it gets repaired. There can be a number of reasons due to which SQL database is marked as SUSPECT. These reasons include faulty hardware components, inappropriate shutdown, missing transaction log, malware attack, corruption in transaction log file, application crash and much more.

I came through the same situation where SQL Database turned to the SUSPECT mode. Analyzing the error log helped me to detect the actual reason behind the cause. This sometimes helps to bring the database to the online mode efficiently. To resolve this issue, initially, it requires changing the status of the database to EMERGENCY mode to gain read-only access as a DBA.

After doing this, I tried executing DBCC CHECKDB for executing logical and physical integrity checks. Further, repair_rebuild and repair_allow_data_loss were executed for SQL repair operation. However, during the initial attempt to gain access to the database tables, I realized that some content is missing.

Probability: Executing DBCC_CHECKDB with repair_allow_data_loss might have resulted in loss of data components.

Since no recent backup is available, all deleted records need to be recovered. Then I decided to deploy Stellar Phoenix SQL Database Repair tool with the hope to get data recovered. The tool is known to integrate the following features:

     1. Repairs damaged MDF and NDF database files
     2. Recovers deleted records
     3. Recovers SQL tables, queries, rules, indexes, keys, defaults and triggers
     4. Recovers selective data from the selected database file
     5. Saves recovered files as HTML, MS SQL, CSV and XLS file formats
     6. Supports SQL Server 2016\ 2014\ 2012\ 2008 and lower versions

What does SQL Database Repair Tool Offer?

Since database encounters data loss after being recovered from the SUSPECT mode, the MS SQL database repair software was initiated for repairing the corrupt data. The performance of the tool is quite surprising as it recovered maximum contents from the inaccessible database files. Initially, the recovered contents get displayed within the tool panel.

Listed below is the complete functionality of the tool:


     1. Download, install and launch Stellar Phoenix SQL Database Repair. The tool will instruct to stop the SQL Server and copy the corrupted database to another location. This is quite practical because database connected to MS SQL Server cannot be modified as it is under the control of the Server.


     2. Click on Select Database button to upload the damaged database file: During MS SQL 2016 repair procedure, the tool provides the option to select the drive on system with the file type (i.e. MDF or NDF) and search database in that particular location. Alternatively, click on Find button if the location of the file is unknown.

     3. Select the checkbox that says “Include Deleted Records” to recover deleted data from database

     4. Click on Repair button to start the repairing procedure

     5. Select a particular component or folder from the left pane of the tool to preview the integrated items.Once the corrupt database file is selected, the tool enlists all the items saved into that particular file in the right panel of the tool

     6. A message will be displayed that indicates “Selected MS SQL database repaired successfully”. Click on OK to save the repaired data
     7. The tool provides different options to save the repaired data that includes MS SQL, CSV, HTML and XLS

Note: The tool also provides the option to save repaired database file at a selected location on the machine. You can select destination path by clicking on the Browse button. By selecting the given checkbox, you can instruct the tool to automatically open the destination folder once the repaired file is saved.

     8. Then, click on the OK button
     9. Next, the tool offers to save the repaired data either in the New Database or Live Database

Note: You also need to provide Server credentials while saving repaired data to the SQL Server. Next, the tool will prompt you to enter the Server instance name, Authentication, and the name of Existing database. 

     10. The tool will display a message “File saved at the desired path.” Click on OK to complete the procedure
SQL Repair Versions and Purchase Information

SQL Database Repair tool offers two different versions that include: 

     - Trial edition
     - Licensed edition

The trial version of the software offers restricted access. With this version, you can test the functionality up to Step 6 mentioned in the above procedure. This version allows accessing the preview of the repaired data within the tool panel. However, the repaired data can be saved after purchasing the licensed version of the tool. 

To buy the licensed version of the tool, click on the Purchase icon available in the Help menu on the Menu Bar. Next, select the appropriate option for purchasing the software and select a payment mode. Once the payment is processed, the Serial Key will be sent to the registered email id. You can then activate the tool by using this Serial Key. 

Final Verdict
As per my experience, the functionality of Stellar Phoenix SQL Database Repair tool is accurate and efficient when tested on MS SQL 2016 database. During MS SQL 2016 repair process, the tool repaired entire data components that have become inaccessible after the database is brought online from Suspect mode. The integral contents and attributes of the tables, triggers, rules, indexes and other components remain intact, and the integrity of the database is not compromised. 

Saturday

CSRF: Prevent Cross-Site Request Forgery using AntiForgeryToken() in MVC

Introduction

At whatever point we chip away at our application we constrained to our undertaking extension and its business rationales to accomplish our task time conveyance. We couldn't concentrate such a great amount to our security reasons and later after sending of our venture is hacked through cross-site demand imitation. .Net Framework has introduced a new security feature to protect our MVC projects data using anti forgery token whenever we submit data through our MVC application data. Cross-site scripting (XSS) is most dangerous issue on web (internet application). I have already explained a MVC very known error Unexpected if keyword after @ character.
Prevent Cross-Site Request Forgery using AntiForgeryToken() in MVC

Monday

SQL Backup Repair Tool to Recover Corrupt BAK File (Review)

SQL Server is a relational database management system designed with the aim to store and retrieve data. Users can back up the SQL database in a backup file named as BAK file. This file enables the users to recover the entire SQL database in case of any damage to the database. However, the real problem arises when the BAK file gets corrupted or damaged due to certain issues. Thus, in this case it becomes necessary to recover corrupted BAK file. Now the question comes how to recover corrupt BAK file? One such solution to recover the BAK file is by using the third party utility, i.e. SQL Backup Repair Tool. This review discusses about the same based on the performed software testing.

Introduction

SQL backup repair tool is designed in such a way that it helps to recover and export the .bak file into SQL server. The application maintains the integrity of data after recovery. It recovers unlimited amount of data within few moments. It can be accessible on all Windows Operating system.

Quick View

Functions Recovers the SQL Backup File
Current version 5.2
Size 6.3 MB
Interface Graphical User Interface
Windows version supported 8.1 and below editions
Price $149

Different Editions of SQL Backup Repair Tool

The tool is available in two versions, i.e. Demo and Licensed. Users can choose any version accordingly.

  • Demo Edition
Before going for the license version, it is advised to check the working of the tool with the help of the trial edition. The trial version is available free of cost and can be downloaded from the official website. However, there are some limitations, i.e. it scans, and shows preview the entire recovered .bak file but cannot store and export them.



  • Licensed Edition

  • Once the user is satisfied with the working of the demo version, the license version of the tool can be purchased from the official website. It permits users to retrieve, store, and export them into Database of SQL Server.

    Essential Features

    • Recover Complete Backup File
    • SQL backup repair tool enables the user to recover the entire data stored in the backup file like rules, triggers, tables, stored procedures, etc. The users can view the entire data before exporting the data from the file.
      Recover Complete Backup File
    • Export Data With Schema
    • The application offers two options to save the recovered data from the SQL BAK file. The user can save only Schema or can save both Schema and Data. Both the options ensure maintaining the original structure intact.
      Export Data With Schema
    • Dual Export Options
    • The users can export the recovered data directly in SQL server database or can store it in SQL server compatible scripts. The SQL script file can be later restored in SQL server accordingly.
      Dual Export Options
    • Selective Data Export
    • SQL backup repair tool allows the users to recover corrupt SQL BAK file and export selective data from SQL BAK file. The user can selectively export only the necessary data items from the SQL backup file.
      Selective Data Export
    • Supports Both Keys
    • The software provides extended support for all the elements of the database along with primary and foreign keys. The application is programmed in such a way that supports both the keys while retrieving the database.

    • Preview Data Component
    • Once the corrupt SQL backup file is recovered by the application, it allows the users to preview the data. The preview of complete data contains the tables, rules, triggers, functions, columns, Indexes, views, etc.
      Preview Data Component

    Pros:
    • Supports all editions of Windows
    • No file size limitation

    Cons:
    • Fails to back up the deleted files
    • Does not supports Mac OS.

    Conclusion

    Considering the working performance of the SQL backup repair tool, it can be rated as 9.5/10. Although, the application fails to recover the deleted files and does not support Mac operating system. However, it efficiently recovers the highly inaccessible files. Moreover, its in-built and user-friendly interface is very helpful for users to repair corrupt SQL backup file. It supports dual mode to export the recovered data.

    Saturday

    Text to Speech: Download free Text to Speech Software

    Introduction

    Free Text to Speech software is empowered with rich functionality to read any text format into speech/voice.

    Free Text to Speech Software Version (1.8.0.0)

    Most Popular Supporting Windows Environment

    Windows 10

    • Windows 10 Home
    • Windows 10 Pro
    • Windows 10 Enterprise
    • Windows 10 Enterprise LTSB
    • Windows 10 Education

    Windows 8

    • Windows 8.1
    • Windows 8.1 Pro
    • Windows 8.1 Enterprise
    • Windows 8
    • Windows 8 Pro
    • Windows 8 Enterprise
    • Windows 8 OEM

    Windows 7

    • Windows 7 Home Basic
    • Windows 7 Home Premium
    • Windows 7 Professional
    • Windows 7 Enterprise
    • Windows 7 Ultimate
    • Windows Thin PC
    • Windows Vista Home Basic
    • Windows Vista Home Premium
    • Windows Vista Business
    • Windows Vista Enterprise
    • Windows Vista Ultimate

    Windows XP

    Text to Speech/Voice Supporting Languages

    • English
    • Spanish
    • French and other European languages.

    System Requirements

    This is light weight programming it will keep running at any PC with least prerequisites with taking after segments Processor, RAM, Hard Drive Space, Graphics card, Sound Card, PC Speakers, Display and so forth.

    Feedback

    Your input is essential for me with the goal that continue sending your profitable criticism to include new usefulness in this product. In not so distant future, you will see more usefulness in this product.
    Download Free Text to Speech

    Dependency

    Download Free Microsoft .NET Framework 4.5 if not already installed on your computer.

    Pros


    • It is very lightweight software.
    • It consumes very little storage of your computer.
    • It is one click software to install on your computer.

    Cons


    • It covers only Windows Operating system.

    Steps to Install Free Text to Speech Software

    Step #1: First of all download Setup from given link here and end of the article. Now unzip folder and start setup  on click Setup_Speech_Text
    text to speech setup file

    Step #2: Now you can see progress installing your free text to speech software.
    text to speech installing progress

    Step #3: Once finished installing process. Finally hit Finish button to complete your installation process.
    install text to speech finish

    Step #4: Now check your Windows desktop icon where your fee text to speech software already installed.
    text to speech desktop icons in windows 10

    Step #5: From very left, click on first icon, a new window will open where you can write or copy/paste text to read from text to voice. Finally click on Read Now button to start reading your text.
    text to speech read now button

    Step #6: Next icon will open a new window where you can send your suggestions to make this software more powerful.
    text to speech suggestions box

    Step #7: Last icon will open this software basic information.
    text to speech info software


    Download Free Text to Speech Software
    Download

    Suggested Reading

    .Net OOPS: OOPS interview questions

    Introduction (OOPS)

    OOPS Programming allows us to develop smaller to smaller logical modules, later we can integrate into one form of software. OOPS includes classes under that methods, entities, events, properties, modules etc. By creating objects can access data in OOPS programming. .Net framework supports only OOPS languages such as vb.net, c#, asp.net, C++ etc. In my earlier example, I have covered almost all MVC ASP.Net Interview Questions And Answers.

    1) What is class in .Net OOPS Programming?

    Access modifiers allows us to access its class members in different types like Public, Private, Protected, Internal, Protected internal, Static.
    Class Inheritance allow us to do to access its base class information and behaviour. Colon image permits us to inherit its base class from derive class.
    public class Furniture
        {
            //Fields, properties, methods, members, events, constructors, destructors etc.
        }
    

    2) What is Class and Class Inheritance in OOPS Programming?

    public class Furniture
        {
            //Fields, properties, methods, members, events, constructors, destructors etc.
        }
     Public class Sandal:Furniture
        {
            //Fields, properties, methods, members, events, constructors, destructors etc.
        }
    

    3) What are objects in OOPS?

    Objects are like variable those who enable to encapsulate data and behaviour
    Furniture _obj = new Furniture();

    4) What are the basic concepts of OOPS ?

    Main top four main features of OOPS are as follows:
    I) Abstraction:- In .net framework, abstraction enable to use multiple inheritance, with the access of abstraction can hide important data and show only important data to show user.
    II) Polymorphism: It capable to use one form into multiple forms.
    II) Encapsulation: We can say encapsulation is subset of abstraction. We can restrict user to show data with the use of encapsulation.
    IV) Inheritance: While we are using inheritance there are two main parts one is derived class and other one is base class. Inheritance provides to capable our application to reuse our code and reduce code size.
    oops main components
    OOPS main components

    5). Which of the following type of class allows only one object of it to be created?

    • Virtual class
    • Abstract class
    • Singleton class
    • Friend class

    6). Which of the following statements is correct?

    • Base class pointer cannot point to derived class.
    • Derived class pointer cannot point to base class.
    • Pointer to derived class cannot be created.
    • Pointer to base class cannot be created.

    7). Which of the following is not the member of class?

    • Static function
    • Friend function
    • Const function
    • Virtual function

    8). Which of the following concepts means determining at run time what method to invoke?

    • Data hiding
    • Dynamic Typing
    • Dynamic binding
    • Dynamic loading

    9). Which of the class’s instances themselves are classes?

    • Subclass
    • Abstarct Class
    • Metaclass
    • Object Class

    10). Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?

    • Call by value
    • Call by reference
    • Default arguments
    • Call by pointer

    11). Which of the following cannot be friend?

    • Function
    • Class
    • Object
    • Operator function

    12). Which of the following concepts of OOPS means exposing only necessary information to client?

    • Encapsulation
    • Abstraction
    • Data hiding
    • Data binding

    13). Why reference is not same as a pointer?

    • A reference can never be null.
    • A reference once established cannot be changed.
    • Reference doesn't need an explicit dereferencing mechanism.
    • All of the above.

    14) Initialise var to null in C# ?

    • var _myVal = (dynamic)null; 
    • var _myVal = (int32)null; 
    • var _myVal = (int)null; 
    • var _myVal = (string)null; 
    • None;

    15) What is Mutable string in .Net framework OOPS? 

    • A mutable string state can't be change 
    • A mutable string state can be change 
    • None 

    16) What is Immutable string in .Net framework OOPS?

    • A Immutable string state can't be change 
    • A Immutable string state can be change
    • None
    Read More: Difference between mutable and immutable string in .Net framework

    17) What is boxing ?

    • Object to value 
    • Value to object 
    • Both A and B 
    • None
    int a = 123;
    object o = a;  //boxing
    

    18) What is unboxing ? 

    • Object to value 
    • Value to object 
    • Both A and B 
    • None
    o = 123;
    a = (int)o;  // unboxing
    
    Read More: What is Boxing and Unboxing in .Net Framework

    19) Which modifier is used to class as a sealed class? 

    • Protected 
    • Private 
    • Sealed 
    • None 

    20) A sealed class cannot be used as a base class? 

    • Yes 
    • No 
    • None 

    21) Can be use sealed class as an abstract class? 

    • Yes 
    • No 
    • None 

    22) Can be use sealed class for inheritance?

    • No 
    • Yes 
    • None 

    23) Can be structs considered like sealed class? 

    • No 
    • Yes 
    • None
    public sealed class Csharp
    {
        // Class members here.
    }
    

    24) What is Mutable string in .Net framework OOPS?

    • A mutable string state can't be change 
    • A mutable string state can be change 
    • None 

    25) What is Immutable string in .Net framework OOPS?

    • An Immutable string state can't be change 
    • An Immutable string state can be change 
    • None 

    26) Can we instantiate Interface class ? 

    • Interface can be instantiated 
    • Interface cannot be instantiated 
    • Both A and B 
    • None 

    27) Does Interface class require inheriting ?

    • No 
    • Yes 
    • None 

    28) Which keyword is used to class as a sealed class?

    • Protected 
    • Private 
    • Sealed 
    • None 

     29) Does Interface class support inheriting?

    • Yes 
    • No 
    • None 

    30) Can Interfaces contain only the declaration of the members?

    • Yes 
    • No 
    • None 

    31) Which keyword is required to make Interface class?

    • Keyword
    • Sealed 
    • Interface
    • None

    32) Interface class can contains only properties, indexers, methods, delegates and events signature?

    • No 
    • Yes 
    • None 

    33) Can we instantiate abstract class?

    • No 
    • Yes 
    • None 

    34) Can be an abstract class as a sealed class?

    • No
    • Yes
    • None

    35) Can be an abstract class inherited from more than one class?

    • No 
    • Yes 
    • None 

    36) An abstract class can contain constructors and destructor?

    • No 
    • Yes 
    • None 

    37) Can it an abstract method likely implicitly virtual method?

    • No 
    • Yes 
    • None

    Conclusion (OOPS)

    OOPS provides great capability with Re-usability, Inheritance, Data Hiding, Reduced complexity of a problem, Easy to Maintain and Upgrade, Modifiable and Message Passing to develop high quality software with cost cutting.

    OOPS, IIS and Other ASP.Net Interview Questions and Answers:

    Tuesday

    IIS Reliability: How to make Application Pool more Reliable

    Introduction

    Application Pool Identity corresponds to security of our website with domain while running our websites under IIS. Application Pool Identity runs our website under an unique account to server apex security. Security is especially obliged highlight to ensure our delicate data while run our application over the web. Network service is default identity in IIS, it does not require password security so it caused low privileged. You can reconfigure IIS Application Pool Identities according to your particular necessity. Application Pool Identity is required in both way running on our application on Cloud or not. I have already explained how to setup application pool identity and fixed Application Pool Identity very known issue Login failed for user IIS apppool default apppool. In this article, I am explaining thoroughly how to make Application Pool more reliable.

    Main IIS Issues Resolution

    I have already provided resolution to very popular IIS issues like HTTP Error 403.14 - Forbidden in IISConnection Timeout In IISHTTP Error 503. The service is unavailable etc.

    Main Types of Application Pool Identity


    • LocalService
    • LocalSystem
    • NetworkService
    • ApplicationPoolIdentity

    LocalService, LocalSystem and NetworkService have more rights than ApplicationPoolIdentity. It is highly recommended to run your websites under high user rights to secure website over internet/intranet etc. You can also define your username and password if you choose a separate custom account.

    By Command line, we can also provide complete access to DefaultAppPool 

    ICACLS test.txt /grant "IIS AppPool\DefaultAppPool":F

    Conclusion

    Application Pool Identity first time introduced in Windows Server 2008 and later versions. Application Pool Identity helps to make your application more reliable and secure over internet. Here, I have shown how to make application pool more reliable in IIS. Security of our data is must whenever our application running over the internet. To make our app more reliable and robust with great harness, it is necessary to make our application more secure through IIS Pool Identity settings.

    Saturday

    MVC Charts: How to create charts using MVC

    Introduction

    Already explained how to send SMS using C# in my previous article, here explaining about MVC Charts. Chart Helper is an outstanding option to show your data in graphical representation. The Chart Helper shows data in image in different chart types like Funnel, Bar Chart, Pie, Column, Candlestick, Doughnut, StackedBar100, BoxPlot, Pyramid, Polar, Radar, RangeBar etc. Chart Helper can show more than 30 chart types in MVC C#. Here, I are explaining main properties of Charts like Height, Weight, Title, Series and then finally write charts into output bmp file. In this sample, I will show how to create charts using MVC.

    Database Script

    CREATE TABLE [dbo].[tblMVCCharts](
     [ChartID] [int] IDENTITY(1,1) NOT NULL,
     [Growth_Year] [int] NULL,
     [Growth_Value] [float] NULL
    ) ON [PRIMARY]
    
    
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2008,50)
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2009,70)
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2010,80)
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2011,90)
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2012,120)
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2013,150)
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2014,100)
    insert into [dbo].[tblMVCCharts] (Growth_Year, Growth_Value) values (2015,300)
    

    Namespace

    using System.Web.Helpers;
    

    Height-Weight

    We can increase-decrease chart height and weight as per your customisation requirements

    Title

    Here we can put title of the chart.

    Series

    In series property, Series is very required property to provide data (X & Y series) to generate into graphical form. We need to provide data for X (Horizontal) and Y (Vertical) series to show data in graphical representation, that is what we need to extract from our data into chart in MVC.

    Write

    Write properties is finally convert our data into image form to output in to BMP file.
    Every chart necessarily requires values for x and y for similar collection of information. Here are showing growth overs years values for X and Y.

    Controller Action Column Chart

    public ActionResult CharterColumn()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Vanilla3D)
        .AddTitle("Chart for Growth [Column Chart]")
       .AddSeries("Default", chartType: "column", xValue: xValue, yValues: yValue)
              .Write("bmp");
    
        return null;
    }
    

    Razor View Column Chart

    <img src="@Url.Action("CharterColumn")" alt="Chart" />

    Column Chart Output

    Column Chart

    Controller Action Bar Chart

    public ActionResult ChartBar()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Vanilla3D)
        .AddTitle("Chart for Growth [Bar Chart]")
                .AddSeries("Default", chartType: "Bar", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Bar Chart

    <img src="@Url.Action("ChartBar")" alt="Chart" />

    Bar Chart Output

    Bar Chart

    Controller Action Pie Chart

    public ActionResult ChartPie()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Vanilla3D)
        .AddTitle("Chart for Growth [Pie Chart]")
                .AddLegend("Summary")
                .AddSeries("Default", chartType: "Pie", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Pie Chart

    <img src="@Url.Action("ChartPie")" alt="Chart" />

    Pie Chart Output

    Pie Chart

    Controller Action Three Line Break Chart

    public ActionResult ChartThreelinebreak()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        /// SeriesChartType.Candlestick
        new Chart(width: 600, height: 400, theme: ChartTheme.Vanilla3D)
        .AddTitle("Chart for Growth [Three Line Break Chart]")
                .AddSeries("Default", chartType: "Candlestick", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Three Line Break Chart

    <img src="@Url.Action("ChartThreelinebreak")" alt="Chart" />

    Three Line Break Chart Output

    Three Line Break Chart

    Controller Action Bubble Chart

    public ActionResult Bubblebreak()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.Bubble
        .AddTitle("Chart for Growth [Bubble Chart]")
                .AddLegend("Summary")
                .AddSeries("Default", chartType: "Bubble", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Bubble Chart

    <img src="@Url.Action("Bubblebreak")" alt="Chart" />

    Bubble Chart Output

    Bubble Chart

    Controller Action Doughnut Chart

    public ActionResult DoughnutGraph()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.Doughnut
        .AddTitle("Chart for Growth [Doughnut Chart]")
                .AddLegend("Summary")
                .AddSeries("Default", chartType: "Doughnut", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Doughnut Chart

    <img src="@Url.Action("DoughnutGraph")" alt="Chart" />

    Doughnut Chart Output

    Doughnut Chart

    Controller Action StackedBar100 Chart

    public ActionResult ChartStackedBar100()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.StackedBar100
        .AddTitle("Chart for Growth [StackedBar100 Chart]")
                .AddSeries("Default", chartType: "StackedBar100", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View StackedBar100 Chart

    <img src="@Url.Action("ChartStackedBar100")" alt="Chart" />

    StackedBar100 Chart Output

    StackedBar100 Chart

    Controller Action BoxPlot Chart


    public ActionResult ChartBoxPlot()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.BoxPlot
        .AddTitle("Chart for Growth [BoxPlot Chart]")
                .AddSeries("Default", chartType: "BoxPlot", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View BoxPlot Chart

    <img src="@Url.Action("ChartBoxPlot")" alt="Chart" />

    BoxPlot Chart Output

    BoxPlot Chart

    Controller Action Pyramid Chart


    public ActionResult ChartPyramid()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.Pyramid
        .AddTitle("Chart for Growth [Pyramid Chart]")
                .AddLegend("Summary")
                .AddSeries("Default", chartType: "Pyramid", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Polar Chart

    <img src="@Url.Action("ChartPyramid")" alt="Chart" />

    Pyramid Chart Output

    ChartPyramid

    Controller Action Polar Chart

    public ActionResult ChartPolar()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.Polar
        .AddTitle("Chart for Growth [Polar Chart]")
                .AddSeries("Default", chartType: "Polar", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Polar Chart

     <img src="@Url.Action("ChartPolar")" alt="Chart" />

    Radar Chart Output

    Polar Chart

    Controller Action Radar Chart

    public ActionResult RadarChart()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.Radar
        .AddTitle("Chart for Growth [Radar Chart]")
                .AddSeries("Default", chartType: "Radar", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Radar Chart

    <img src="@Url.Action("RadarChart")" alt="Chart" />

    Radar Chart Output

    Radar Chart

    Controller Action RangeBar Chart

    public ActionResult ChartRangeBar()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
                
        /// SeriesChartType.RangeBar
        .AddTitle("Chart for Growth [RangeBar Chart]")
                .AddSeries("Default", chartType: "RangeBar", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View RangeBar Chart

    <img src="@Url.Action("ChartRangeBar")" alt="Chart" />

    RangeBar Chart Output

    RangeBar Chart

    Controller Action Funnel Chart

    public ActionResult ChartFunnel()
    {
        var _context = new TestEntities();
    
        ArrayList xValue = new ArrayList();
        ArrayList yValue = new ArrayList();
    
        var results = (from c in _context.tblMVCCharts select c);
    
        results.ToList().ForEach(rs => xValue.Add(rs.Growth_Year));
        results.ToList().ForEach(rs => yValue.Add(rs.Growth_Value));
    
        new Chart(width: 600, height: 400, theme: ChartTheme.Green)
    
        /// SeriesChartType.Funnel
        .AddTitle("Chart for Growth [Funnel Chart]")
        .AddLegend("Summary")
                .AddSeries("Default", chartType: "Funnel", xValue: xValue, yValues: yValue)
                .Write("bmp");
    
        return null;
    }
    

    Razor View Funnel Chart

    <img alt="Chart" chartfunnel="" src="@Url.Action("ChartFunnel") />

    Funnel Chart Output

    Funnel Chart

    Conclusion

    Charts help us to represent data into graphical form from tabular data. MVC charts have been provided facility to represent data into different charts. We can analyse data minutely with the help of MVC charts to take up comparative decisions. Hopefully, above all charts will help everyone to represent data in to many ways in your web app. I tried here how to create charts using MVC with detailed example and also attached a working sample with database.

    Download Working Sample

    Download
    Note: Change Connection String in web.config before to run this working sample of MVC Charts.

    Video: How to create charts using MVC

    Suggested Reading