Monday 15 August 2011

c# - Getting an EntityCollection to talk to the database -


I believe what I found in the context of a main square for the operation of the unit, but do not know how Wire it to the database, and the MSDN is less on the documentation (Google is also less useful).

Again, forgive my ignorance, as I'm new to this, and only recently have been coming for speed, but how will I connect or reflect this change with the database ? I just do not see a way between this, and say DBCNotext. Do I hand out a query? Am I missing some special classes which provides some functionality which I have been missed in the last three days, is that I am trying to make this framework to be anything less useful? Thanks to anyone who accepts this difficult task.

  EntityCollection & lt; T & gt; NewCollection = New Unit Collection & lt; T & gt; (); NewCollection.Add (objectValue);   

I mean, there is only one list / array for EntityCollection units? Or does the database contain some back-end hooks? When its methods are called, and whether it is in magical nature, or does some work to do, which makes magic work? As I think, this class is just class

Behaves like / code> - that is, it's an in-store archive.

Look at this answer:

But if you see the MSDN documentation about your method, then you will see that it can be related to ObjectContext and end Data-source (database):

Add method combines an object into an entity collection and creates a relationship between two objects. When the object object is added to the object contact instance, add the add method object to the object's context as well. This operation is translated into an insert operation in the data source when SaveChanges is called. See Adding, Modifying and Deleting Objects (Unit Framework) for more information.

No comments:

Post a Comment