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 would like to evaluate using Lightspeed to replace the Entity Framework, as we are getting really poor performance when using Entity Framework on top of MySQL (it generates terrible SQL code with way too many sub-selects which perform poorly on MySQL). Is there a tool available to import an existing EDMX file for Entity Framework for use with Lightspeed? Also, our model has a ton of entities in it, so I am wondering if it is possible to get an evaluation version of the software so we can import our entire database schema and test it with our code, before purchasing? The Express edition with support for 8 Entities is not doing to be suitable for that purpose :( |
|
|
You can import an EDMX file into LightSpeed by creating a LightSpeed model, then dragging the EDMX file from Solution Explorer onto the model surface. (Obviously the EDMX and LightSpeed files need to be in the same solution; if you don't want this, you'll need to temporarily add the project containing the EDMX file to the solution, then remove it again once you've done the import.) Most basic stuff should come across okay, but do check the import where you are using more advanced features like inheritance or many-to-many associations -- the importer is pretty basic at the moment. Regarding an evaluation copy for large models, please email jd@mindscape.co.nz and he should be able to sort something out for you. |
|
|
Doh! That should be "by dragging the EDMX file from Solution Explorer..." Sorry! |
|
|
Ok thanks! |
|
|
We are looking into a similar scenario -- moving away from MS EF due to lack of EF on Mono. I our case a fair amount of linq code is written against MS EF and ideally I would like to reuse that code. However during the conversion LightSpeed camel-cases table names and while I get a similarly looking model, all the linq code have to be changed. Is there a set of templates that can be used with a designer or lsgen that does not camel-case table names/field names and instead of "Id" use whatever the name is used for primary key in the SQL table (essentually doing exactly what EDMX does) -- then this should just require a recompile (plus a small change to map LightSpeed "unit of work" class to EDMX "context") Thanks! |
|
|
You could override the name of the LINQ unit of work (to be e.g. XxxContext) using custom templates (http://www.mindscapehq.com/blog/index.php/2009/09/16/customising-lightspeed-entity-templates/). The DataContext.vm file is the one you'll need to edit for this. This wouldn't work so well for entity class names though, unless you have a systematic casing policy for these: you really want to get them as desired within the .lsmodel file rather than trying to fix them up during code generation. There isn't an import policy for this, so you will need to edit the .lsmodel file after performing the import. The simple but manual way to do this is to go round all the entity shapes pressing F2 and modifying the casing. The more efficient but potentially error-prone way to do it is to open the .lsmodel file in a text editor and do a global Replace (take care to fix up references to the renamed entity classes e.g. in entityMoniker elements). You can't change the name of the Id property, because that is defined in the LightSpeed Entity class. |
|