This is Complete tutorial on how to get data from SQL Server 2012 Using ASP + MVC 5 + Angualar.Js and Visual Studio C# HomeController.cs public JsonResult GetInfoList() { List Entity = new List(); DataSet ds = new DataSet(); using (SqlConnection con = new SqlConnection(SqlConnectionString)) { using (SqlCommand cmd = new SqlCommand()) { cmd.Connection = con; cmd.CommandText = "select Id,Name,Age,Phone from ASP_Angular_MVC"; using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { da.Fill(ds); } } } if (ds != null && ds.Tables.Count > 0) { foreach (DataRow dr in ds.Tables.Rows) Entity.Add(new ModelInfo(int.Parse(dr.ToString()), dr.ToString(), dr.ToString(), dr.ToString())); } return Json(Entity); } Tutorial App.js var app = angular.module("SearchApp", []); app.controller("SearchController", function ($scope, $http, $location) { $scope.Infofill = function () { var httpreq = { method: 'POST', url: '/Home/GetInfoList', headers: { 'Content-Type':
http://www.echomaster.space/aspmvcangular/how-to-get-data-from-sql-server-using-asp-mvc-angularjs














