Good...

Just an appoint: if you need to store up to 30k in a column, I think that
you are _probably_ doing something wrong...

A part from Linq, you should consider to move the 30k of datas to idenfiable
locations (like files identified by uri's) and strore in the column the uri
only.


Let me say that this approach would have a lot of advantages even if you
would query the db via plain ADO.NET + SQL strings...



BTW, if I would be wrong, I'd really like to know why you have choosen such
approach...
Just to learn something new... ;-)


Giacomo



On Tue, Jun 30, 2009 at 5:47 AM, greyman <[email protected]> wrote:

>
> I got it sorted out with the help of DynamicLinq and Giacomo's
> suggestion.
>
>  PropertyInfo property = typeof(T).GetProperty(propertyName);
>  if (property == null) {
>   throw new ApplicationException("Property " + propertyName + " for "
> + typeof(T).Name + " could not be found, GetProperty failed.");
>  }
>  else {
>   using (DataContext dataContext =
> DBLinqContext.CreateDBLinqDataContext(m_storageType, m_dbConnStr)) {
>     Table<T> table = dataContext.GetTable<T>();
>     string idString = id.ToString();
>      Expression<Func<T, Object>> mySelect =
> DynamicExpression.ParseLambda<T, Object>(property.Name);
>     var query = (from asset in table where asset.Id == idString
> select asset).Select(mySelect);
>     return query.FirstOrDefault();
>   }
>  }
>
> Regards,
>
> Aaron
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to