Click here to Skip to main content
16,013,747 members
Home / Discussions / C#
   

C#

 
AnswerRe: Using connection continuously Pin
Luc Pattyn5-Jun-10 7:19
sitebuilderLuc Pattyn5-Jun-10 7:19 
AnswerRe: Using connection continuously Pin
Erik Funkenbusch6-Jun-10 11:01
Erik Funkenbusch6-Jun-10 11:01 
QuestionComplex SQL Insert Query Pin
TenRC5-Jun-10 5:05
TenRC5-Jun-10 5:05 
AnswerRe: Complex SQL Insert Query Pin
Not Active5-Jun-10 6:58
mentorNot Active5-Jun-10 6:58 
GeneralRe: Complex SQL Insert Query Pin
TenRC5-Jun-10 13:23
TenRC5-Jun-10 13:23 
QuestionEF question -- get a name of a table [modified] Pin
Lutosław5-Jun-10 4:49
Lutosław5-Jun-10 4:49 
AnswerRe: EF question -- get a name of a table Pin
Not Active5-Jun-10 6:51
mentorNot Active5-Jun-10 6:51 
GeneralRe: EF question -- get a name of a table Pin
Lutosław5-Jun-10 12:14
Lutosław5-Jun-10 12:14 
Mark Nischalke wrote:
Add(object obj)

No, but I have a method such as this:
Add(T obj)
in a generic class.

It would be cool if an entity object had an Add method. But it does not. Instead of this, the objectContext.AddToX(X entity) method must be used, where X is a name of an entity.

However, if you look into assembly, all these AddToX methods are implemented in the following fashion:
public void AddToX(X x)
{
    base.AddObject("X", x);
}

So, calling AddObject(name, object) directly is not as bad as it looks like.

I think I don't exactly understand how all this works. The properties objectContext.X represent tables, doesn't they? Why there is no Add method in them? If they had Add(T item) method then my problem would be nonexistant. Now I have to use sick statements like typeof(T).Name to get it working.
Greetings - Jacek
modified on Saturday, June 5, 2010 6:36 PM

GeneralRe: EF question -- get a name of a table Pin
Not Active5-Jun-10 13:03
mentorNot Active5-Jun-10 13:03 
GeneralRe: EF question -- get a name of a table Pin
Lutosław5-Jun-10 13:50
Lutosław5-Jun-10 13:50 
GeneralRe: EF question -- get a name of a table Pin
Not Active5-Jun-10 15:18
mentorNot Active5-Jun-10 15:18 
GeneralRe: EF question -- get a name of a table Pin
Lutosław6-Jun-10 4:04
Lutosław6-Jun-10 4:04 
Questionhow to handle Server Not found exception at client side in .net remoting? Pin
amit_834-Jun-10 22:48
professionalamit_834-Jun-10 22:48 
AnswerRe: how to handle Server Not found exception at client side in .net remoting? Pin
#realJSOP5-Jun-10 2:02
professional#realJSOP5-Jun-10 2:02 
Questionoutput confusion Pin
Unknown Ajanabi4-Jun-10 22:03
Unknown Ajanabi4-Jun-10 22:03 
AnswerRe: output confusion Pin
Estys4-Jun-10 22:18
Estys4-Jun-10 22:18 
AnswerRe: output confusion [modified] Pin
DaveyM695-Jun-10 1:35
professionalDaveyM695-Jun-10 1:35 
AnswerRe: output confusion Pin
#realJSOP5-Jun-10 1:58
professional#realJSOP5-Jun-10 1:58 
GeneralRe: output confusion Pin
DaveyM695-Jun-10 2:20
professionalDaveyM695-Jun-10 2:20 
GeneralRe: output confusion Pin
Luc Pattyn5-Jun-10 2:47
sitebuilderLuc Pattyn5-Jun-10 2:47 
GeneralRe: output confusion Pin
DaveyM695-Jun-10 3:10
professionalDaveyM695-Jun-10 3:10 
GeneralRe: output confusion Pin
Luc Pattyn5-Jun-10 3:23
sitebuilderLuc Pattyn5-Jun-10 3:23 
GeneralRe: output confusion - OT Pin
DaveyM695-Jun-10 4:28
professionalDaveyM695-Jun-10 4:28 
GeneralRe: output confusion - OT Pin
Luc Pattyn5-Jun-10 4:40
sitebuilderLuc Pattyn5-Jun-10 4:40 
GeneralRe: output confusion Pin
Luc Pattyn5-Jun-10 3:31
sitebuilderLuc Pattyn5-Jun-10 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.