how to run single winform inside project with many winforms without running entire project?
using System.Data;
using System.Drawing;
using System.Linq;
using Syncfusion.Windows.Forms;
namespace Desktop
{
public partial class WarnaForm : MetroForm
{
private DataTable table;
public WarnaForm()
{
InitializeComponent();
_initializeData();
_initializeGridGrouping();
}
private void _initializeData()
{
table = getTable();
/*
using (HMERPEntities context = new HMERPEntities())
{
var queryDaftarSemuaWarna = context.warna;
foreach (var w in queryDaftarSemuaWarna.ToList())
{
DataRow rowNew = table.NewRow();
rowNew["No"] = w.warna_id;
rowNew["Nama"] = w.nama;
table.Rows.Add(rowNew);
table.AcceptChanges();
}
}*/
}
public DataTable getTable()
{
DataTable table = new DataTable();
table.Columns.Add("No", typeof (long));
table.Columns.Add("Nama", typeof (string));
return table;
}
private void _initializeGridGrouping()
{
gridGroupingControl1.DataSource = table;
}
}
}
for winform without connection to database, i do this by using the Immidiate Window: Immidiate Window
but when i put my code with entity-framework connection (uncommenting EF Part), it gives me an error Immidiate Window with error
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in EntityFramework.dll Evaluation requires a thread to run temporarily. Use the Watch window to perform the evaluation.
many thanks,
ps: i am using: - visual studio CE 2013 - c# winforms with .net version 4.5 - windows 7