コード例 #1
0
 private void populateSetaGridview()
 {
     using (var Dbconnection = new Impendulo.Data.Models.MCDEntities())
     {
         setaBindingSource.DataSource = (from a in Dbconnection.LookupSetas
                                         select a).ToList <LookupSeta>();
     };
 }
コード例 #2
0
 private void insertSeta(LookupSeta setaObj)
 {
     using (var Dbconnection = new Impendulo.Data.Models.MCDEntities())
     {
         Dbconnection.LookupSetas.Add(setaObj);
         Dbconnection.SaveChanges();
     };
 }