Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         bdWebEntities ef     = new bdWebEntities();
         var           paises = (from p in ef.pais select p).ToList();
     }
 }
Example #2
0
        protected void bRegistrar_Click(Object ob, EventArgs ev)
        {
            bdWebEntities ef = new bdWebEntities();

            try
            {
                pais p = new pais();
                p.pais1 = tbPais.Text;
                ef.pais.Add(p);
                ef.SaveChanges();
                Response.Redirect("wfPais.aspx");
            }
            catch (Exception ex)
            {
                lMsg.Text = "Error " + ex.Message;
            }
        }