R
RichB
I'm not sure if this is the right place to post this, but I would be grateful
for some advice on selecting a data access model for my MVC application.
I have tried using Linq to SQL and Entity Framework, both with mixed results.
Linq to SQL I probably can make work, though the adjustments I would need to
cater for EntitySets
(http://www.microsoft.com/communitie...19bb40bca7c0&lang=en&cr=US&sloc=en-us&m=1&p=1)
made me start looking at the Entity Framework. I cannot however get this to
work for creation of objects in the following scenario:
I have an activity which may occur at one or more locations on different
dates. I want to find all future activities (comprised of multiple objects)
and order them by the distance from my current location. I found this
article: http://blog.wekeroad.com/2007/08/30/linq-and-geocoding/ which I know
is referring to Linq to Sql, but I assume it also applies equally to Linq to
Entities. It basically concludes that Linq is unable to generate the SQL
required, and that a two stage process is required to get the data, then
filter by distance. I feel that the number of objects created relative to the
filtered number is too large to take this approach.
I’m also not sure that Linq to SQL is the best long term option as MS moves
effort away to EF.
I also understand that EF SP support is due to be improved in .NET 4.
However in the meantime what are my options?
Should I use Linq to SQL for this SP and EF for other actions.
OR is there another approach to SP with EF in my distance from scenario
which will allow me to create the objects for my List of Activities?
for some advice on selecting a data access model for my MVC application.
I have tried using Linq to SQL and Entity Framework, both with mixed results.
Linq to SQL I probably can make work, though the adjustments I would need to
cater for EntitySets
(http://www.microsoft.com/communitie...19bb40bca7c0&lang=en&cr=US&sloc=en-us&m=1&p=1)
made me start looking at the Entity Framework. I cannot however get this to
work for creation of objects in the following scenario:
I have an activity which may occur at one or more locations on different
dates. I want to find all future activities (comprised of multiple objects)
and order them by the distance from my current location. I found this
article: http://blog.wekeroad.com/2007/08/30/linq-and-geocoding/ which I know
is referring to Linq to Sql, but I assume it also applies equally to Linq to
Entities. It basically concludes that Linq is unable to generate the SQL
required, and that a two stage process is required to get the data, then
filter by distance. I feel that the number of objects created relative to the
filtered number is too large to take this approach.
I’m also not sure that Linq to SQL is the best long term option as MS moves
effort away to EF.
I also understand that EF SP support is due to be improved in .NET 4.
However in the meantime what are my options?
Should I use Linq to SQL for this SP and EF for other actions.
OR is there another approach to SP with EF in my distance from scenario
which will allow me to create the objects for my List of Activities?