Friday, September 16, 2016

To insert data into the table using linq c#

           using (bmEntities dbcontext = new bmEntities())
   {
                taskdetail td = new taskdetail();

                td.tdate = Convert.ToDateTime(txtdate.Text);

                td.name = txtexp.Text;

                td.amount = Convert.ToDecimal(txtamt.Text);

                td.uid = 1;

                dbcontext.taskdetails.Add(td);

                dbcontext.SaveChanges();

    }

No comments:

Post a Comment

Git Commands

Git Version   To check the git version Git -v       Git Clone To clone the repository, use the following command: Git clone [u...