Hi Friends,
I am new to asp.net_mvc3 and Json
below is my code for json in mvc
public class Default1Controller : Controller
{
sampleEntities db = new sampleEntities();
public JsonResult Index()
{
IList<emp> emps = db.emps.ToList();
return Json(emps, JsonRequestBehavior.AllowGet);
}
this works fine
but my question if I create classes like below
public class DatabaseContext : DbContext
{
public DbSet<Role> Roles { get; set; }//class Role
public DbSet<Country> Countries { get; set; }//class Country
I want these classes become my tables in database how can I do this
If anybody knows the answer plz help me
srujana