private void saveimgbtn_Click(object sender, EventArgs e) { AspireDB db = new AspireDB(); db.Configuration.ProxyCreationEnabled = false; List<Course> cour = db.Courses.ToList<Course>(); String str = HelpMe.GetJson(cour); Console.Write(str); HelpMe.SaveFileNow(str, "courses"); }
private void saveimgbtn_Click(object sender, EventArgs e) { AspireDB db = new AspireDB(); db.Configuration.ProxyCreationEnabled = false; List <Subject> sub = db.Subjects.ToList <Subject>(); // Create JSON String String str = HelpMe.GetJson(sub); // Save in file with extension HelpMe.SaveFileNow(str, "subject"); }