Mvc Execute Stored Procedure With Parameters

As I already said, you need to run it on a DbSet, not on the context or some entity type. To show all stored procedures of a particular database, you use the following query:. Today I came across the stumbling block of passing multi-value parameters to a Stored Procedure. NET MVC site included in sample. CRUD Operation In ASP. This how-to describes how you can create the ProcessInstance record and Parameter through the DAL and then execute a stored procedure. We are going to continue with our previous example to explain the different ways. We are also going to work with the same example that we worked in our previous article. [addLog] -- Add the parameters for the stored procedure here @table SYSNAME, --<-- use SYSNAME data type for Sql Server objects @date date, @version varchar(max), @process varchar(max), @level varchar(max), @message varchar(max), @stacktrace varchar(max), @user varchar(max), @environmentID varchar(max),. A stored procedure is group of T-SQL (Transact SQL) statements. CallableStatement interface is used to call the stored procedures and functions. To execute stored procedures, you specify the name of the stored procedure in the first parameter of a SqlCommand constructor and then set the CommandType of the SqlCommand to StoredProcedure. Here: We set the formal parameter "value" to 1, and the formal parameter "name" to "Perl". In the above code, the method GetCustsByCity is attributed with Function parameter indicating that this method calls a stored procedure. I've deliberately provided a more complex example using an output parameter so you can see how it's used. I was going through an interesting performance issue when calling a stored procedure from my web application more than one time and the WCF was timing out because of the stored procedure execution takes long time to execute. In this article, I am going to discuss FormCollection in ASP. Enter them correctly. To create a stored procedure with parameters using the following syntax: CREATE PROCEDURE dbo. but my stored procedure returns query from join tables that have many fields that my employee class model can't accomodate. Create a java class which makes a call to the procedure proc1, created before. The first one is to use the OpenAccessContext. Demo Lets see what are these two ways: Way 1: This is probably the simplest method to call a stored procedure with minimal effort. Demonstrate the use of the JDBC to call stored procedures from a Microsoft SQL Server database and return data to a Java-based console application. Parameters objects that correspond to the IN, INOUT and OUT parameters. "@Count" is an output parameter to store a number of student count values. Right Click and select Execute Stored Procedure; If the procedure, expects parameters, provide the values and click OK; Along with the result that you expect, the stored procedure also returns a Return Value = 0. NET / MVC / How to execute stored procedure in MVC 5 How to execute stored procedure in MVC 5 RSS 1 reply. Net MVC 4 application to Create. GridView from Stored Procedure In this article, you can see how to populate a gridview from stored procedure. In this example we will show you, How to use Output Parameters in a Stored procedures. net MVC 5 for retrieve data from database using Asp. In that we have to write a Stored Procedure by writing a templated code according to our needs. But if you want to call the Stored Procedure then? Lets learn it. Passing Multiple Records to a Stored Procedure in SQL Server passed when using table value parameters as well in a stored procedure. You can also send parameters to a stored procedure by using SqlParameter objects, the same way it is done with SqlCommand objects that execute query strings. Calling a stored procedure which has IN, OUT and INOUT parameters and retrieve the values of these parameters. A big exception to this rule is if exec\execute\sp_executesql is used within a stored procedure, these may run a string built up from component parts. This post is on using stored procedure in EF Core. Assume that your stored procedure insert/update/delete record into database. If you execute the same stored procedure with the same parameters multiple times, then it will execute the same SQL statement each time, but it will only track one result set. Download full source code here. In this article, I will explain you how to call stored procedure with OUTPUT parameter using ado. A new feature is provided in JPA 2. Something like this might be needed for example when user can add multiple rows at once to insert to database like in small ASP. We will use the GetCustomerLevel() stored procedure that accepts a customer number as an input parameter and returns the customer level based on credit limit. I am using database first approach for connecting database. Alternatively, you can also execute stored procedure using SqlQuery method. Then I call the. On selection of Customer from DropDownList it will call stored procedure which accepts CustomerID as input parameter and return its Customer and Order details. NET MVC application. If you are using simple ado. This article demonstrates how to use ASP. NET / MVC / How to execute stored procedure in MVC 5 How to execute stored procedure in MVC 5 RSS 1 reply. Using PL/SQL to Capture Business Logic. When you define an IN parameter in a stored procedure, the. Creating a SQL Stored Procedure with Parameters. Let's create a getFoosByName() stored procedure in MySQL. How to debug stored procedure when Oracle is running in Docker? Posted on 25th July 2019 by Kelvin Ho I used to debug Oracle stored procedure using Oracle SQL Developer. This tutorial will show 3 different ways to call a database stored procedure with Hibernate. I am looking to call a stored procedure from ASP. This is a write-only parameter i. Finally the list of Customers Entity is returned to the View. Executing parameter less stored procedure is very simple, use EXEC with stored procedure name. And there is no way to call stored procedures other than to execute SQL right now. /* Create Stored Procedure */ CREATE PROCEDURE dbo. NET MVC application. The next wizard page presents the generated query parameters. The stored procedure is shown below; it takes an OrderID and returns the details for that order. As I already said, you need to run it on a DbSet, not on the context or some entity type. is that a single call can. We’ll see how we can utilize them to solve a problem, that is not handled out of the box by the framework – creating an MVC action that has mandatory query string parameters. This post will show you how to utilize Entity Framework 6 to execute a stored procedure and materialize multiple result sets. Create DataReaderMapper in data access layer. We will supply Male or Female as input parameter value and return count of Male or Female employees as output parameter value based on input parameter. Passing a List from c# to a T-SQL Stored Procedure. However this syntax has limited applicability and any time you need to do something that requires finer control, like invoking a stored procedure with output parameters or with parameters that are not of primitive types, you will have to use the full SQL syntax of the data source. You can also check out the implementation of Stored Procedure in the application of Visual Studio 2013. Input to stored procedure is passed using IN parameter, and output from stored procedure is read using OUT parameter. Understand with Example. I have a store Procedure spGetEmployees with some parameter like @name, @fname and etc and i implemented complete Code in entityframework in my project from database now the question is how to call store procedure and then assigned the returned values into table with paginations thanks. In the first method you can call the procedure using Exec command followed by the procedure name and the list of parameters. How to: Retrieve Data With Stored Procedures. There are several reasons for using stored procedures to perform CRUD operations instead of ad-hoc SQL statements: Performance. NET MVC Controller - Duration: 17:41. I want for the stored procedure to be called on a button I placed in my view. Stored procedure are created and stored in the database. I'm creating edmx file using mysql server in ASP. net core , so I am looking to pass a parameter in this stored procedure and then it gives back a string say Hello Parameter. Executing Raw SQL Queries using Entity Framework. See Section 13. Next we need to create a stored procedure that will accept JSON text as a parameter and insert it into the table. Stored Procedure. So I have decided to make it very simple. In this case we need to specify either @Procedure#value or @Procedure#procedureName (If neither is configured and just @Procedure is used, then the database procedure is attempted to be mapped by the repository. NET MVC4 which is inserting, update and Delete value via Stored Procedure. NET MVC - This article provides an explanation about how to populate a dropdown list from the database using stored procedure in Asp. SQL Server Table. This tutorial helps you to implement jQuery AJAX in your ASP. In my previous article i explained how to create and execute parameterized stored procedure From another stored procedure and hear i will also show you how to execute dynamic stored procedure in sql server with example. IN this is the default mode. NET MVC and the ADO. The Stored Procedure’s output parameter called Result’s value is stored in TempData. Here i will use same database and code and just add additional code to call stored procedure using repository pattern and unit of work. This article demonstrates how to use ASP. In this example we will show you, How to use Output Parameters in a Stored procedures. Stored procedure arguments are declared using the IN parameter type, and the result can be either marked with an OUT parameter type, a REF_CURSOR or it could just return the result like a function. This sample shows how to call stored procedure with table-value parameter while using Entity Framework. Here we can call stored procedures in two different forms, one without using parameter objects which is not recommended for conventional development environments, the other one is the familiar model of using Parameters. Recently I worked on a project, which I started as code first and then I forced to switch to Database first. You can use this approach while working with either of the RDBMS lik. As seen above there are basically two ways to call a stored procedure: By directly mapping to a database stored procedure by its name. Something like this might be needed for example when user can add multiple rows at once to insert to database like in small ASP. CallableStatement interface is used to call the stored procedures and functions. NET MVC Application using the Entity Framework Code First Approach in Visual Studio 2013. Using Transact-SQL To execute a stored procedure. Stored Procedures and Functions. net code with asp. Below is an example which contains the whole flow from creating a connection with the database, to making a call to the stored procedure, passing an array to Oracle procedure, retrieving an array from an Oracle procedure and displaying the result. Ganesh - March 12, 2015. How to capture OUT and RETURN parameter values from a stored procedure in. As I already said, you need to run it on a DbSet, not on the context or some entity type. NET and map to an output parameter in the stored procedure. Download full source code here. And that map stores key as out parameter name and value is value returned by stored. But we can call ASP. /* Create Stored Procedure */ CREATE PROCEDURE dbo. IN parameters. Oracle PL/SQL procedures and functions enable you to store business logic in the database for any client program to use. Start with a C# class mapping to the #Temp table (taken from one of my projects):. It can be used to retrieve data from the tables, Insert, Update or Delete from the tables. Create/modify your stored procedure to accept the new type as a parameter. This can be achieved using the techniques seen in the previous section on parameters, Section 4. NET MVC Controller - Duration: 17:41. This class used to convert DataReader to domain object. I already explained in the previous articles about MVC4 Razor:How to retrieve view values on POST method in Controller using FormCollection,Mvc 4 Razor CRUD Operation using C# and How to create a dropdown list field for MVC4 Razor view?. This happened every time whenever you execute the application. You can also check out the implementation of Stored Procedure in the application of Visual Studio 2013. Before starting off with coding, there are some things that we all need to know and understand well. Join a community of over 2. The example shows the following core features:. NET MVC site included in sample. In order to get an output parameter you need to supply an ObjectParameter to the stored procedure call which holds the parameter name and type. net or access multiple results or objects from stored procedure in dapper using querymultiple method in c#, vb. How to capture OUT and RETURN parameter values from a stored procedure in. Complexity for developers can be decreased while performance can be dramatically increased for users. Here's the. Table-Valued Function in Entity Framework. I will first create a stored procedure during start of application, then will run it using. This article demonstrates how to use ASP. NET web application, you just specify the name of the Stored Procedure. We are also going to work with the same example that we worked in our previous article. NET MVC site included in sample. DropdownlistFor properties to bind dropdown list based on the values from the database. We will use MySQL database for the examples, and suppose that you know how to create a stored procedure using MySQL Workbench tool. And: Whenever Method is called without a parameter specified, its default value is used instead in the method body. But I found it is bit tricky to call a stored procedure by using OLE DB connection. Entity Framework can handle this, and automatically creates an ObjectParameter parameter on the imported function. How to call Stored Procedure in Entity Framework Entity frame work providing the option of adding, updating or deleting the records. DataSource is given as reference in configuration files to initialize this template. Once the stored procedure is modified, it will know how to parse the multi-value parameters and pass back the results as shown in the screenshot below. As simple JDBC query we can also pass the parameters in stored procedures. com In this article we will learn how to map stored procedure parameter with Dapper ORM. How to get stored procedure OUTPUT Parameters in Entity Framework Calling stored procedure from Entity framework code first is not an issue. The difference between this stored procedure and the previous one is that this stored procedure uses parameter values. Jdbc callablestatement – stored procedure in parameter example : The JDBC CallableStatement is used to execute the store procedure and functions. This tutorial will create ASP. To start with here are the steps to. This how-to describes how you can create the ProcessInstance record and Parameter through the DAL and then execute a stored procedure. And we can call it with only an int parameter. I'm posting it here as I don't see any solutions for this problem in the forum already and the Telerik documentation here states it is not possible. IN indicates that a parameter can be passed into stored procedures but any modification inside stored procedure does not change. I wanted to pass in two parameters and get one back, no problem, I've done this with ADO. NET MVC , MVC , MVC 5 on 14 May 2016 compilemode. Crystal Reports will prompt you for the stored procedure parameters. net, code first and database first. NET to call a stored procedure and to get back return values and return parameters, including: Use a DataSet object to gather the returned rows and to work with these rows in addition to the return values and the return parameters. Using Excel with a Stored Procedure as Data Source How to use a SQL Server Stored Procedure as the Data Source for an Excel Worksheet This tutorial explains how to connect to a SQL Server Stored Procedure from Excel and insert the data into a worksheet. And also in this article you will understand how to use the input parameter and output parameter. The one I prefer for SQL Server 2008+ is to use table-valued parameters. Now the issue is, sometimes it wont produce any result and got hang, but most of the times it will return the result within 2-5 seconds. Today I will talk about using stored procedures built into. First lets look at stored procedures which (in my opinion) is the best approach, others of course will disagree. JDBC CallableStatement – Stored Procedure IN parameter example example to call a stored procedure which accepts which has in/Out parameters in procedure. Dapper Tutorial Dapper - Stored Procedure Description. Creating an ASP. MySQL store procedure. Execute method takes input IN parameter of stored procedure. DataSource is given as reference in configuration files to initialize this template. The new MapToStoreProcedures() method has two overrides, one without parameters, that uses EF Code First conventions to setup the Stored Procedures as seen above. We are going to continue with our previous example to explain the different ways. Make sure you have installed all the prerequisites in your computer. FormCollection in ASP. Here's a look at all of them. Basic raw SQL queries. Dear All, please i need help, i newbie using MVC4 ASP. Net classes. How do I call the stored procedure in entity framework core to retrieve the data. In this case we need to specify either @Procedure#value or @Procedure#procedureName (If neither is configured and just @Procedure is used, then the database procedure is attempted to be mapped by the repository. 6 to execute the example above). This article demonstrates how to use ASP. This method returns a CallableStatement object for calling database stored procedures. Hi I am new to MVC and also stored procedure. Parameters make the stored procedure more flexible and useful. Execute stored procedures. Execute is an extension method which can be called from any object of type IDbConnection. However, this is no longer available in Entity Framework Core. Simple MySQL tutorial to create and call stored procedure with IN and OUT parameters from MySQL command prompt. Most major relational database systems (e. We need to set the argument of sql query or stored procedure to use parameters in a SQL command object. Execution of this code. Suppose you wanted to execute complex dynamic query and fetch result with respect to class or view object then stored procedure using repository pattern approach will not work. If you are using simple ado. 08/12/2019; 2 minutes to read +1; In this article. This is a write-only parameter i. Here Mudassar Ahmed Khan has explained how to call and execute a SELECT Stored Procedure with parameters in Entity Framework in ASP. , user-defined type and stored. Your stored procedure can have multiple IN and OUT parameter. The parameter value will be passed to the SELECT Stored Procedure and it will return multiple records using Entity Framework model in C# and VB. IN is the default mode. In this case we need to specify either @Procedure#value or @Procedure#procedureName (If neither is configured and just @Procedure is used, then the database procedure is attempted to be mapped by the repository. Some of the benefits of using LINQ2SQL are: 1. For example, consider the SPROC below which returns either a product result or an order result depending on the input parameter:. Tutorial: Use async and stored procedures with EF in an ASP. net with stored procedure, Since it is a hot topic in the market today. To create a stored procedure with parameters using the following syntax: CREATE PROCEDURE dbo. the stored procedure must contains the input parameters @unit", "@partGroup", and "@partCode" 3) The line below executes the store procedure. net-mvc c# entity-framework entity-framework-core English (en). After some trial and error, I have discovered a way to do this. In MySQL, a parameter has one of three modes: IN,OUT, or INOUT. Once the stored procedure has been created, you can see it in the Object Explorer (you might need to refresh the Stored Procedures node first). In this article I am creating an application in ASP. Stored Procedure - A stored procedure is a group of SQL statements which can be stored into the database and can be shared over the netwrok with different users. Hibernate provides support for queries via stored procedures and functions. In order to get an output parameter you need to supply an ObjectParameter to the stored procedure call which holds the parameter name and type. Not a bad idea, however in my case the stored procedure gets called from multiple places, so finding all those places and ensuring they call the 2nd procedure too didn't seem that practical. Hi friends,in this article I will explain about How to call Stored Procedure in MVC4 Razor. Please read my previous article to understand the basics about MVC: ActionResult in ASP. You can also check out the implementation of Stored Procedure in the application of Visual Studio 2013. Net, Entity Framework, Stored Procedures. Sometimes we required to create store procedure in database and nowadays Hibernate is very popular ORM framework and most of the application using Hibernate so you may need to call the store procedure using Hibernate. However, it is easy to create store procedure in SQL Server Management Studio but here I will explain how you can create and execute Store Procedure right from your program. One procedure takes input parameters, and the other procedure does not take parameters. Use a low privileged account to run the database. In the application where one has used entity framework, one can use entity framework itself to call stored procedure. NET and ADO. NET MVC ? is i've a stored procedure whose process is to take all the user input values as parameters and. Net MVC applications. In this article we will learn how to map stored procedure parameter with Dapper ORM using DynamicParameters class of Dapper, Let's demonstrate it with step by step examples, Suppose you have following model class which values assigned from UI. "@Count" is an output parameter to store a number of student count values. MySQL store procedure. NET Core currently, there is a no option to scaffold the stored procedure, But there is an option to execute the stored procedure based on that execute the option you can create your own execution method also you need to create a model builder for it. Net MVC 4 application to Create. Actually we can't execute store procedure directly by jQuery. We need to pass the procedure name and parameter information to the prepareCall() method. First of all, let us understand how to create a stored procedure in MySQL. In the database, we can execute the GetStudents stored procedure with an INPUT parameter value like below: GetStudents "Bill" -- or exec GetStudents "Bill" You can execute SP using FromSql method in EF Core in the same way as. Luckily, EF allows you to execute raw queries easily. To overcome this drawback, move such database calling logic to unit of work. Stored Procedure. In this stored procedure, we are getting student count from "tblStudentDetails" filtered with student city. How to return multiple output parameters from SQL Server Stored Procedure. The function returns VARCHAR directly and the procedure returns the VARCHAR by reference as an OUT parameter rStr:. Join Martin Guidry for an in-depth discussion in this video Creating a basic web form and connecting to a database, part of SQL Server: Triggers Stored Procedures and Functions. Nevertheless, there are times when you might need to make use of database stored procedures, and Entity Framework 6 Code. You should be able to go into the SQL Manager inside the database to verify the command worked by right clicking the database table name and select create QUERY. Posted by Anuraj on Wednesday, July 20, 2016 Reading time :2 minutes. If you are sound with the SQL Server then you know very well how to create database, table and stored procedures. How to call Stored Procedure in. Actually we can’t execute store procedure directly by jQuery. This method returns a CallableStatement object for calling database stored procedures. I want to call store procedure in one of the controller of the applicaiton. net Mvc - Calling A Stored Procedure (MVC4) Jan 14, 2012 (Using MVC4 VB EF4 MSSQL Razor) I created a Stored Procedure in the MS SQL 2008 database. (Note: I used VS2010, MVC 4, MySQL Server 5. How to debug stored procedure when Oracle is running in Docker? Posted on 25th July 2019 by Kelvin Ho I used to debug Oracle stored procedure using Oracle SQL Developer. 9 thoughts on “ TIBCO BW: How to Call Stored Procedures Using JDBC Call Procedure Activity ” PRABAKAR April 28, 2014. com I have decided to write the article with step by step approach using ASP. This stored procedure has two parameters: an input parameter (e. Simple example that shows how to pass objectparameter to stored procedure in MVC. If the stored procedure name contain spaces, the designer automatically converts them to the underscore (_ ) character. Here's a look at all of them. MVC, Angular JS CRUD using WEB API 2 with Stored Procedure In this article you will learn about MVC, Angular JS CRUD using WEB API 2 with Stored Procedure. Once the stored procedure has been "stored", client applications can execute the stored procedure over and over again without sending it to the database server again and without compiling it again. /* Create Stored Procedure */ CREATE PROCEDURE dbo. Create/modify your stored procedure to accept the new type as a parameter. One of the parameters for function is a name that determines what stored procedure to call. This is another popular question I receive. This class can call MySQL stored procedures. Now, the stored procedure is in the database, and we want to use it in our context class. NET and map to an output parameter in the stored procedure. To map stored procedure with Dapper ORM DynamicParameters class of Dapper is used, lets see how to map it. NET - JavaScript - Tutorials Add a stored procedure folder and stored procedure. After some trial and error, I have discovered a way to do this. I'm a beginner in MVC programming, repository, and UOW using Entity framework. SimpleJdbcCall. This way, number of placeholder, number of setXXX() call and parameter index in stored proc all matched. Executing parameter less stored procedure is very simple, use EXEC with stored procedure name. In my next posts, I am going to show you how to cache this MVC model in SQL Server so next time you call the same Sale, SQL Server will return it much faster from cache. 7 Steps Easy video Tutorial for call Stored Procedure in MVC Step: 1 Configure Application like Create Model & add Controller etc Step: 2 Create Stored Procedure Step: 3 Syntax to call SQL Statement Step: 4 Loading data From Simple SQL Statement Step: 5 Loading data From Stored Procedure Step: 6 Pass Parameter to Stored Procedure. Execution of this code. Today I will talk about using stored procedures built into. Here, I will demonstrate to save image in MVC step by step. 7 Steps Easy video Tutorial for call Stored Procedure in MVC Step: 1 Configure Application like Create Model & add Controller etc Step: 2 Create Stored Pr. It is a model class for the Lightweight MVC framework that can connect to a MySQL database and call given stored procedures. The next wizard page presents the generated query parameters. For example, we have a stored procedure, called "myProc", which does something, and it has a list of parameters:. I need to return the results of a query (multiple records) using a stored procedure. 01/18/2019; 8 minutes to read +3; In this article. Entity Framework 6. Here we can call stored procedures in two different forms, one without using parameter objects which is not recommended for conventional development environments, the other one is the familiar model of using Parameters. net-mvc c# entity-framework entity-framework-core English (en). in case you are mapping to existing stored procedures. Stored Procedures and Functions. MVC C# calling stored procedure with parameters the first parameter is not being recognised. We are also going to work with the same example that we worked in our previous article. Stored procedure features and command syntax are specific to the database engine. NET MVC Controller - Duration: 17:41. Using Stored Procedure in Dapper is very easy, you simply need to specify the command type. After some trial and error, I have discovered a way to do this. Listing stored procedures using the data dictionary. First time it executes as expected. Here is a simple example that shows how to call a stored procedure by using Execute SQL task. The simplest kind of SQL Server stored procedure that you can call is one that contains no parameters and returns a single result set. In a previous topic we discussed how to pass parameters into a stored procedure, but another option is to pass parameter values back out from a stored procedure. MVC is a design pattern used to decouple user-interface (view), data (model), and application logic (controller). Execute Stored Procedures In MVC Core Using Entity Framework Core Best Stored Procedure For CRUD Operations; How Can You Use Optional Parameters in C#;. Parameters make the stored procedure more flexible and useful. net or access multiple results or objects from stored procedure in dapper using querymultiple method in c#, vb. This article described the use of Stored Procedure in the ASP. There are four ways to pass the data Using stored procedures in Entity Framework Model First Approach (Part I - Adding New Stored procedure). The example executes the uspGetEmployeeManagers stored procedure with the value 6 specified as the @EmployeeID parameter. 1 allowing a direct usage of stored procedures without using native query. This pattern helps to achieve separation of concerns. CallableStatement interface is used to call the stored procedures and functions. Net MVC 5 Razor. Create table: CREATE TABLE [dbo]. NET MVC , MVC , MVC 5 on 14 May 2016 compilemode. Create a stored procedure that returns the just-inserted record's IDENTITY column value using an OUTPUT parameter. Entity Framework 6 Code-First provides the ability to create and use a stored procedure for add, update, and delete operations when the SaveChanges() method is called. So, we’re going to write a stored procedure call in the old-fashioned style, but throw in generics so we can re-use this. Entity Framework 6. But I don't know the reason why I would use it over just using a simple SELECT statement. In an earlier column, I showed how to call a stored procedure from Entity Framework without having to mess with connection and. Once the stored procedure is modified, it will know how to parse the multi-value parameters and pass back the results as shown in the screenshot below. The following example shows how to create an application that calls a stored procedure in a SQL Server database. Closing CallableStatement Object. Here, "City" is an input parameter and we passed it to our stored procedure to filter and get the student count. postId) and an output parameter (e. Stored Procedure with Table-Valued Parameter in EF and ASP. 6, MySQL Connector/Net 6. The simplest kind of SQL Server stored procedure that you can call is one that contains no parameters and returns a single result set. How to execute long running SQL query or stored-procedure from. Create a stored procedure with the above created UDT as a parameter. NET MVC Application. The conditional if statement checks the id parameter and then performs either the insert or update of a student i. It is not happened in case of stored. Click to share on Facebook (Opens in new window) Click to share on LinkedIn (Opens in new window) Click to share on Twitter (Opens in new window). To use stored procedure, you do not need to modify the Employee. The CustOrderCount() method returns an object of type ObjectResult. This tutorial will create ASP.