1. EDM: How to obtain the ObjectContext from an EntityObject
Hi, Is there a way to find the ObjectContext to which an EntityObject is attached, from an EntityObject-derived reference alone? Reason: so I don't need to pass the ObjectContext around- if I need the ObjectContext (eg. to delete an entity), I want to infer it from the EntityObject-derived Entity reference. Thanks, +Mark
2. EntityObject Cancel Edit - ADO.Net
3. Class A contains class B, class B points to class A
Okay. So I have a class A, which contains a vector of B. Any B item is owned by a single, unique A. Indeed, when we create A, A creates its B items. B would like to know which A it is contained in, without having to be perpetually told it by being passed A when B methods are called. How can B store its A (or some handle to A) if A stores B? Say that B has a pointer to its A. However, if I create a copy of an A object and delete the original, all the B->A pointers are invalidated. Doh! Another solution would be to have a boost::shared_ptr to A in each B. But that doesn't work, because when you construct an item of type A and it wants to create the items of type B, A is a plain object and hasn't been created using the smart_ptr 'new'. [sorry to get slightly off-topic from vanilla C++ here] Anybody have any suggestions? Maybe someone can suggest an appropriate pattern or way to redesign? Thanks Joseph
4. static classes, nested class, public class - CSharp/C#
5. Getting a reference to the base class of a base class from an inherited class
Is there any way to get a reference to the base class of a base class from an inherited class? I need to call an overriden method. Any help would be much appreciated.
6. Class B using Class C, and Class A using both B and C
7. Decralation of class inside other class and definition outside this class
We have here class of C++ language:
namespace Apt
{
class Name1
{
public:
class Name2;
};
}
I 'm give ebove class Name2 so a declalation of class without a definition
because to it do not shaded class Name1.
Question:How have it define class Name2 outside of class Name1,and to have a
decralation od class Name2 inside a class Name1?
Thanks in Advance.
8. function defined with base class return derived class object when called with a derived class