How to call and execute stored procedures in ASP.Net MVC(C#)
<p>Good day guys, I'm in a little limbo here. I have created my database, model, controller and view in visual studio using ASP.NET MVC and C#, but I can't figure out how to call a stored procedure that I created also.</p>

<p>I want for the stored procedure to be called on a button I placed in my view.
This stored procedure should execute and display results when the button is click.
Below are the Stored procedure, view, model and controller I created.</p>

<p>This is my 'Employee' Model:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace MVCSimpleApp.Models
{
    [Table("Employees")]
    public class Employee
    {
        [Display(Name ="Employee Id")]
        public int EmployeeId { get; set; }
        [Display(Name ="First Name")]
        public string FirstName { get; set; }
        [Display(Name ="Last Name")]
        public string LastName { get; set; }
    }
}
</code></pre>

<p>This is my Data Context:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace MVCSimpleApp.Models
{
    public class EmployeeContext : DbContext
    {
        public DbSet&lt;Employee&gt; Employee { get; set; }
    }
}
</code></pre>

<p>This is my Employee Controller:</p>

<pre><code>using MVCSimpleApp.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;

namespace MVCSimpleApp.Controllers
{
    public class EmployeeController : Controller
    {
        private EmployeeContext db = new EmployeeContext();
        // GET: Employee
        public ActionResult Index()
        {

            var employees = from e in db.Employee select e;
            return View(employees);
        }
    }
 }
</code></pre>

<p>And now this is my Stored procedure. It is not much, just something for practice purpose.</p>

<pre><code>Create Proc DisplayStudents
AS
BEGIN
     /*selecting all records from the table whose name is "Employee"*/
    Select * From Employee
END
</code></pre>

<p>This is my view:</p>

<pre><code>@model IEnumerable&lt;MVCSimpleApp.Models.Employee&gt;

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
 }

 &lt;h2&gt;Student List&lt;/h2&gt;

 &lt;p&gt;
    &lt;a href="@Url.Action("Create")" title="Add new" class="btn btn-primary btn-lg"&gt;
        &lt;span class="glyphicon glyphicon-plus "&gt;&lt;/span&gt;
        Add Student
    &lt;/a&gt;


&lt;/p&gt;
&lt;table class="table"&gt;
    &lt;tr&gt;
        &lt;th&gt;
            @Html.DisplayNameFor(model =&gt; model.EmployeeId)
        &lt;/th&gt;
        &lt;th&gt;
            @Html.DisplayNameFor(model =&gt; model.FirstName)
        &lt;/th&gt;
        &lt;th&gt;
            @Html.DisplayNameFor(model =&gt; model.LastName)
        &lt;/th&gt;
        &lt;th&gt;&lt;/th&gt;
    &lt;/tr&gt;

 @foreach (var item in Model) {
 &lt;tr&gt;
    &lt;td&gt;
        @Html.DisplayFor(model =&gt; item.EmployeeId)
    &lt;/td&gt;
    &lt;td&gt;
        @Html.DisplayFor(modelItem =&gt; item.FirstName)
    &lt;/td&gt;
    &lt;td&gt;
        @Html.DisplayFor(modelItem =&gt; item.LastName)
    &lt;/td&gt;
    &lt;td&gt;
        &lt;span&gt;
            &lt;a href="@Url.Action("Edit", new { id = item.EmployeeId})" title="Edit Record"&gt;
                &lt;span class="glyphicon glyphicon-pencil"&gt;&lt;/span&gt;
            &lt;/a&gt;
        &lt;/span&gt;
        |
        &lt;span&gt;
            &lt;a href="@Url.Action("Details", new { id = item.EmployeeId})" title="View Details"&gt;
                &lt;span class="glyphicon glyphicon-th-list"&gt;&lt;/span&gt;
            &lt;/a&gt;
        &lt;/span&gt;
        |
        &lt;span&gt;
            &lt;a href="@Url.Action("Delete", new { id = item.EmployeeId})" title="Delete"&gt;
                &lt;span class="glyphicon glyphicon-trash"&gt;&lt;/span&gt;
            &lt;/a&gt;
        &lt;/span&gt;
    &lt;/td&gt;
&lt;/tr&gt;
}
  /*this is the button I want the stored procedure to be called on when I click it*/
  &lt;button&gt;Run&lt;/button&gt;
&lt;/table&gt;
</code></pre>

<p>Please guys I need your opinions and feedback on this matter. Will accept tips in passing parameters to a stored procedure. Please correct me if I am not doing things right here. Thanks for your concern.</p>