This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I've been searching your forums for references to the LinqDataSource and found very little talk about it. I'm assuming that it isn't possible to use a LinqDataSource with a LightSpeed model (I did try but got stuck at the context step). I noticed that there is a LightSpeedLinqDataSource that is used in DynamicData projects. I don't see any mention of it outside of dynamic data and was wondering if it is possible to create one in a ASP.NET form? What I am ultimately trying to do is link up my LightSpeed model with a Telerik grid. Thanks |
|
|
My understanding is that LinqDataSource is specifically hardwired to Microsoft's LINQ to SQL, and will not work with any other LINQ provider. LightSpeedLinqDataSource does the equivalent job for LightSpeed, but has so far been tested only in the Dynamic Data scenario. As far as I can see it *should* work as a drop-in replacement for LinqDataSource, but there may be edge cases that require some additional work at our end (hopefully nothing too hairy and we will be able to get fixes to you quickly!). The other alternative is to use the ObjectDataSource. We certainly do have customers using LightSpeed models with Telerik grids but I am not sure exactly how they are hooking up the data sources -- if you search the forums for "telerik" then you will find several relevant threads which may contain useful info or the other customers may be willing to share more details of what they're doing. |
|
|
Thanks, I found a sample project from John-Daniel showing how to hook up LightSpeed to a GridView using ObjectDataSource. That should work with the Telerik grid as well. As far as the LightSpeedLinqDataSource goes, I had a look at the DynamicData project to see how the data source is defined in the aspx file. Interestingly, there isn't much configuration to it. I'm guessing the data source is connected to the context though the model.RegisterContext in the Global.asax. This is the problem I am having with the non-dynamic data project. I don't know what to set the context to in the LightSpeedLinqDataSource. The editor offers a bunch of possibilities. I tried the unitOfWork object that is defined for my project but that fails because the unitOfWork isn't associated with a context object. It would be nice to get the LightSpeedLinqDataSource working outside of Dynamic Data as it seems to be a better solution to the ObjectDataSource. |
|
|
Hmm, you're right, it looks like the LightSpeedLinqDataSource relies on the dynamic data infrastructure for a key part of its behaviour. We'll have to take a look at whether we can round this out to make it work in the world of "normal" ASP.NET pages. I can't make any promises around timescale though, I'm afraid -- bit busy round here at the moment! |
|
|
Hi Ivan: I have had a chance to work with ObjectDataSource for a few days now and like it very much. I like it's rather generic interface which lets you connect asp data views with just about anything. It also supports the custom paging and filtering in GridViews that I was looking for. So don't put too much priority on the LinqDataSource. You might want to consider doing a sceencast on ObjectDataSource as I think it is as valuable as Dynamic Data. You could base it on the sample project that I mentioned earier by John-Daniel. Thanks. |
|