enter image description herei'm creating a task insinternet 4. using mvc3. I'm using two attribute name and fname(father title).

my controller class:

loginController.cs

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcMovie.Models;

namespace MvcMovie.Controllers
{ 
    public class loginController : Controller
    {
        private logindata db = new logindata();

        //
        // GET: /login/

        public ViewResult Index()
        {
            return View(db.loginobj.ToList());
        }

        //
        // GET: /login/Details/5

        public ViewResult Details(int id)
        {
          //  login login = db.loginobj.Find(id);
            login login = db.loginobj.Find(2) ;
            return View(login);
        }

        //
        // GET: /login/Create

        public ActionResult Create()
        {
            return View();
        } 

        //
        // POST: /login/Create

        [HttpPost]
        public ActionResult Create(login login)
        {
            if (ModelState.IsValid)
            {
                db.loginobj.Add(login);
                db.SaveChanges();
                return RedirectToAction("Index");  
            }

            return View(login);
        }

        //
        // GET: /login/Edit/5

        protected override void Dispose(bool disposing)
        {
            db.Dispose();
            base.Dispose(disposing);
        }
    }
}

model class

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
login.cs

namespace MvcMovie.Models
{
    public class login
    {
        public int ID { get; set; }
        public string name{get; set;}
        public string fname { get; set; }
    }
    public class logindata : DbContext
    {
        public DbSet<login> loginobj { get; set; }
    }
}

view.cshtml

@model IEnumerable<MvcMovie.Models.login>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            name
        </th>
        <th>
            fname
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.fname)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>

I wish to request that where's data saved that is produced by me? means how do i observe that table of records that is made by me?

whenever i click of .sdf file then there's an issue happened as proven in following picture, what must i do in order to solve this issue. must i installed something. i installed visual studio 2010 and sql server 2008.

Most likely you are using Microsoft SQL CE to keep the application data. If this sounds like the situation, have a look in the Application_Data folder in Solution Explorer. You need to visit a file with .sdf extension there. Just make certain to choose Show All Files icon in Solution Explorer. More particulars here.

enter image description here

enter image description here

it appears like its carried out by

private logindata db = new logindata()

Have you got that part in particulars?

That logindata DBContext appears like it had been produced by Entity Framework. That's pointing to some database somewhere, which database is how you'd visit find your computer data. You can try looking in web.config for any connection string which has the database info, or maybe any project includes a .edmx file inside it open might see what its pointing at.