public static int AddStudentParentInfo(StudentParentInfo studentParentInfo) { //create DBContext object using (var smsDB = new SMSEntities()) { //Add Student object into Students DBset smsDB.StudentParentInfoes.Add(studentParentInfo); // call SaveChanges method to save student into database return(smsDB.SaveChanges()); } }
protected override void OnAppearing() { base.OnAppearing(); BindingContext = vm = new StudentParentInfo(); }
public FrmStudentParentContact() { InitializeComponent(); BindingContext = vm = new StudentParentInfo(); }