TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
prabhu p
NA
181
115k
how to fix this error
May 15 2016 1:14 PM
I am new to entity frame work
when trying to insert data to Database
iam gettin error "'System.Data.Objects.ObjectSet<Entityframeworkinsertupdelete.Departement>' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'System.Data.Objects.ObjectSet<Entityframeworkinsertupdelete.Departement>' could be found (are you missing a using directive or an assembly reference?)"
protected void Button1_Click(object sender, EventArgs e)
{
welcometestingEntities context = new welcometestingEntities();
department obj = new department();
obj._name = TextBox1.Text;
obj._location = TextBox2.Text;
context.Departements.Add(obj); //error on this line
//--- Bind data to repeater.
bindStudentInfo();
//--- Show confirmation message in label.
//--- Clear text from textboxes
}
please help me
thanks
Reply
Answers (
4
)
Import Excel to Json format on ASP.NET
inventory management system c# web application