How to display data from database again by changing keep?

Good time again!
Tell me this time is this:
I have a project on mvc 4 working with a database that spin on sqlexpress 2014. Base thank God works from the project outputs edited data back stores.
My trouble is this:
In the admin area approximately 50 bases will be, I'll do it for each individual view. But I want to make datagrid what would it have been released, created for example a new line and save. And all this thing I want around here's how to do it: an Example of what I want, but alas, I do not understand how to attach jquery to a specific table from the database and output saving.
Poke me again in the solution of this quest, please!!!!
July 2nd 19 at 18:26
2 answers
July 2nd 19 at 18:28
You specified for the link because there is a ready code:
var grid dialog;
grid = $('#grid').grid({
 // your url that will pass data from your dB
 dataSource: '/Grid/GetPlayers',
 uiLibrary: 'bootstrap',
 // names of fields that should be displayed in the table
 columns: [
 { field: 'ID', width: 32 },
 { field: 'Name', sortable: true },
 { field: 'PlaceOfBirth', title: 'Place Of Birth', sortable: true }
 pager: { limit: 5, sizes: [2, 5, 10, 20] }

On the server side you can do Action in a conventional controller, which will make the query to the database and return data in format JSON. But it is better to use a WebAPI, it will be easier.

Removal and preservation of the individual methods.

Sketched a simple example:
It is possible to check the sample you will need to reinstall the packages. To do this, click the Service => Nuget package Manager => the package Manager Console and type the following command:

Update-Package –reinstall

In the controller there is a method GetAccounts, which returns records from a database:

public JsonResult GetAccounts(int page, int limit)
 using (var context = new Database1Entities())
 // get records for the specified page
 var result = context.Account.OrderBy(
 row => row.AccountID
 ).Skip((page - 1) * limit).Take(limit).ToArray();
 int total = context.Account.Count();

 // return json
 return Json(new { records = result, total = total });

In the presentation, in the initialization code of the jQuery Grid Bootstrap, reference is made to this method:

grid = $('#grid').grid({
 // reference to the GetAccounts action in the Home controller
 // the request is POST method
 dataSource: { url: '/Home/GetAccounts', method: 'POST' },
 uiLibrary: 'bootstrap',
 columns: [
 { field: 'AccountID', sortable: true },
 { field: 'FirstName', sortable: true },
 { field: 'LastName', sortable: true },
 { field: 'Company', sortable: true },
 { field: 'Position', sortable: true }
 pager: { limit: 2, sizes: [2, 5, 10, 20] }
July 2nd 19 at 18:30
Good time, Alexei Nemiro !
The model database is this:
using System.Data.Entity;

namespace ......Areas.Auth.Models
public class RWOnlineDb : DbContext
public DbSet AccountModel { get; set; }
The data in the database are as follows:
using System.Collections.Generic;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace .................Areas.Auth.Models
public class AccountModel
public int AccountID { get; set; }

[Display(Name = "Email")]
[Required(ErrorMessage = "Email Not specified")]
public string Email { get; set; }

[Display(Name = "Login")]
[Required(ErrorMessage = "unknown Login")]
public string Username { get; set; }

[Display(Name = "Password")]
[Required(ErrorMessage = "Enter a password")]
public string Password { get; set; }

[Display(Name = "Repeat password")]
[Compare("Password", ErrorMessage = "Confirm password")]
public string ConfirmPassword { get; set; }

[Display(Name = "Last Name")]
[Required(ErrorMessage = "name Not specified")]
public string LastName { get; set; }

[Display(Name = "Name")]
[Required(ErrorMessage = "No surname")]
public string FirstName { get; set; }

[Display(Name = "Company")]
[Required(ErrorMessage = "name Not specified")]
public string Company { get; set; }

[Display(Name = "Position")]
[Required(ErrorMessage = "name Not specified")]
public string Position { get; set; }

[Required(ErrorMessage = "phone Not specified")]
public string Phone { get; set; }

public string Zip { get; set; }

public string State { get; set; }

public string City { get; set; }

public string Address { get; set; }
But I don't get how to set the path to the database
dataSource: '/Grid/GetPlayers', ----- what is it?

Thank you in advance...

Find more questions by tags ASP.NETjQuery