Note that there are some explanatory texts on larger screens.

plurals
  1. POwhere is data stored?
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/tu2G3.png" alt="enter image description here">i am designing a project in .net 4.0 using mvc3. I am using two attribute <code>name</code> and <code>fname</code>(father name).</p> <p>my controller class:</p> <p>loginController.cs</p> <pre><code>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); } } } </code></pre> <p>model class</p> <pre><code>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&lt;login&gt; loginobj { get; set; } } } </code></pre> <p>view.cshtml</p> <pre><code>@model IEnumerable&lt;MvcMovie.Models.login&gt; @{ ViewBag.Title = "Index"; } &lt;h2&gt;Index&lt;/h2&gt; &lt;p&gt; @Html.ActionLink("Create New", "Create") &lt;/p&gt; &lt;table&gt; &lt;tr&gt; &lt;th&gt; name &lt;/th&gt; &lt;th&gt; fname &lt;/th&gt; &lt;th&gt;&lt;/th&gt; &lt;/tr&gt; @foreach (var item in Model) { &lt;tr&gt; &lt;td&gt; @Html.DisplayFor(modelItem =&gt; item.name) &lt;/td&gt; &lt;td&gt; @Html.DisplayFor(modelItem =&gt; item.fname) &lt;/td&gt; &lt;td&gt; @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | @Html.ActionLink("Details", "Details", new { id=item.ID }) | @Html.ActionLink("Delete", "Delete", new { id=item.ID }) &lt;/td&gt; &lt;/tr&gt; } &lt;/table&gt; </code></pre> <p>I want to ask that where is data stored which is created by me? means how can I see that table of entries which is done by me?</p> <p>whenever i click of .sdf file then there is a problem occured as shown in following picture, what should i do to solve this problem. should i installed something. i installed visual studio 2010 and sql server 2008.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload