protected void lb_sor_Click(object sender, EventArgs e)
        {
            var tag = new Proje.DataAccess.tag();

            tag.title = tbx_tagler.Text;
            Proje.Business.Tag.TagEkle(tag);

            var soru = new Proje.DataAccess.question();

            soru.title   = tbx_baslik.Text;
            soru.body    = tbx_detay.Text;
            soru.tag_id  = Proje.Business.Tag.TagID(tag.title);
            soru.user_id = int.Parse(Session["kullaniciID"].ToString());
            Proje.Business.Soru.SoruEkle(soru);

            Response.Redirect("~/Sorular");
        }
Example #2
0
 public static void TagEkle(Proje.DataAccess.tag tag)
 {
     Proje.DataAccess.WebProgramlamaEntities ent = new DataAccess.WebProgramlamaEntities();
     ent.tag.Add(tag);
     ent.SaveChanges();
 }