How can I fetch and insert data at a single time in mvc4??

Jun 19 2014 7:41 AM

I want to fill the following when I add the subject and cheater models.

  • department list
  • semester list
  • standard list
  • stream list

cheater model:-

namespace firstapp.Models 
{ 
public class chepter   
{ 
[ForeignKey("dip_id")]
public int dipart_id { get; set; } 
public int chep_id { get; set; } 
public string subject { get; set; } 
public string chepter { get; set; } 
public List<dipartment> dipartlist { get; set; } 
public List<dipartment> stdlist { get; set; } 
public List<dipartment> semlist { get; set; } 
public List<dipartment> stremlist { get; set; } 
} 
} 
 

department model:

namespace firstapp.Models
 { 
public class dipartment
{
 public int dip_id { get; set; }
 public string dipart { get; set; }
 public string std { get; set; }
 public string sem { get; set; } 
public string strem { get; set; }
 } 
}