Re: creating ExecuteQuery method
- From: "Andrus" <kobruleht2@xxxxxx>
- Date: Fri, 21 Mar 2008 19:20:19 +0200
Marc,
* might want to think about "struct" T, or discount it with T : class;
as it stands it will be boxed repeatedly and changed discared. Would
need "object foo = t" after create, and use foo (not t) in SetValue
* if you don't use T : class, might want to think about T =
Nullable<TSomethingElse>; here new(T) = null...
I looked into msdn doc and find that its method signature does not have
new() constraint.
So they use some other way, no idea how.
They also allow to maps results directly to fields.
I don't understand how to implement your suggestions to change the code.
* might want to ignore readonly properties
MS doc does not describe RO property behaviour.
So I'm not sure maybe ro property can considered as programmer error. In
this case it is not reasonable to ignore it silently.
* might want to think about a mapping attribute between SQL column
name and the object property name
Yes this will match more closely to Linq-SQL.
I do'nt now how to implement it, so this remains unresolved issue by me.
Andrus.
.
- Follow-Ups:
- Re: creating ExecuteQuery method
- From: Marc Gravell
- Re: creating ExecuteQuery method
- References:
- creating ExecuteQuery method
- From: Andrus
- Re: creating ExecuteQuery method
- From: Marc Gravell
- Re: creating ExecuteQuery method
- From: Marc Gravell
- Re: creating ExecuteQuery method
- From: Andrus
- Re: creating ExecuteQuery method
- From: Marc Gravell
- Re: creating ExecuteQuery method
- From: Andrus
- Re: creating ExecuteQuery method
- From: Marc Gravell
- Re: creating ExecuteQuery method
- From: Andrus
- Re: creating ExecuteQuery method
- From: Marc Gravell
- creating ExecuteQuery method
- Prev by Date: Re: Why does tsSource[j].Text.ToUpper() causes side effects
- Next by Date: Re: C# 3.0 property setter question!
- Previous by thread: Re: creating ExecuteQuery method
- Next by thread: Re: creating ExecuteQuery method
- Index(es):