title: How to find the column data object name that includes column members
body: <p>I am trying to insert a record using Link to SQL. I know I need to create a new object that includes the column data to be submitted. But How do I identify that object name?</p>
  
  <p>I am successfully able to delete the record, but not able to insert record as I am not able to create a new "student" object</p>
  
  <p>Here is my code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using Student.Models;
  
  namespace Student.Controllers
  {
      public class StudentController : Controller
      {
          //
          // GET: /Student/
  
          private IStudentRepository  _repository;
  
          public StudentController() : this(new StudentRepository())
          {
          }
  
          public StudentController(IStudentRepository repository)
          {
              _repository = repository;
          }
  
          public ActionResult Index()
          {    
               return View(_repository.ListAll());
          }
  
  
          public ActionResult RemoveStudent(int id)
          {
  
              StudentDataContext student= new StudentDataContext();
  
              var std = student.Students.Single(h =&gt; h.StudentID == id);
              student.Students.DeleteOnSubmit(std);
              student.SubmitChanges();
              return Content("Student " + id + " Removed");
          }
  
          public ActionResult AddStudent(int studentID)
          {
              StudentDataContext student= new StudentDataContext();
  
              var std = student.Students.FirstOrDefault(h =&gt; h.StudentID == studentID);
  
              if (std == null || std.StudentID &lt; 1)
              {
  
              student.Students.InsertOnSubmit(std);
              student.SubmitChanges();
              return Content("Student " + id + " Added");
  
              }
  
              return Content("Student  " + studentID + " is already present");
          }
  </code></pre>
  
  <p>Thanks in Advance</p>