Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I am new on entity frame work. I am trying to developing my first wpf application using entity frame work. i don't know how can i insert,delete and update data using entity frame work in wpf application. I am using ado.net data model for binding the controls.
Posted 3-Aug-12 21:10pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If you're using EF, you just add, change or delete objects from the collections tied to your database wrapper instance, then call SaveChanges to save all changes you've made.
  Permalink  
Comments
entiresol at 4-Aug-12 3:17am
   
@Christian Graus can you give me some example that how can i add, change or delete objects from the collections tied to your database wrapper instance
Christian Graus at 4-Aug-12 3:57am
   
You have a class that has a list of DB objects, you just search for the object you want to remove then call the Delete or Remove ( I forget ) method of that collection. You can actually create a new object that has the right id and pass that in to the delete method. You create a new object, and call add. You can search for an object and change it, then it's changed, you don't need to do any more.
 
Overall, i suggest buying a book or reading some articles.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

This article explains how to perform basic CRUD operations using entity framework. It contains everything you need to get your application up and running.
 
An Introduction to Entity Framework for Absolute Beginners[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 310
1 CPallini 310
2 George Jonsson 269
3 Gihan Liyanage 255
4 OriginalGriff 245
0 OriginalGriff 4,903
1 CPallini 3,960
2 Sergey Alexandrovich Kryukov 3,474
3 George Jonsson 2,786
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web04 | 2.8.140905.1 | Last Updated 4 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100