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
|
Issue1: when importing a table schema from a SQLServer 2005 many column types are reported as "object" in the designer, eg: tinyint, money,smallmoney (others too). Issue 2: I want to have a screen that buffers all user actions add,update,delete, and only if they select save, commit to Database. Deleting items then issuing a linq query to retrieve all items works perfectly, but when I add a new item it is not returned when I issue the same query.
|
|
|
Regarding issue 1, I have added support for the remaining column types (except sql_variant and timestamp) and this will be in nightlies numbered 20080710 and above, available after about 1800 GMT from http://www.mindscape.co.nz/Products/LightSpeed/nightlybuilds.aspx. Please let us know if you still see problems (I am a bit concerned because the money type has always been supported in the designer so I am wondering if there is something else going on in your installation). |
|
|
Hi antprog, [quote user="antprog"]Issue 2: I want to have a screen that buffers all user actions add,update,delete, and only if they select save, commit to Database.[/quote] This is the default behavior of the Unit of Work pattern as implemented by LightSpeed. As you work with entities they are tracked by the unit of work, then, when it's time to persist your changes, you can call SaveChanges to "flush" pending changes to the database. Please feel free to post a code snippet or example if there's something I'm missing. Cheers, Andrew. |
|
|
I have various applications that need the following functionality. Add/update/delete entities, recalculate etc / retrieve them at various stages. perform various other tasks on the changed / added entities, then finally: save all changes to the database. After adding an entity, I would like to be able to use it as if it were an actual entity in my collection, and only finally commit everything. eg: Recalculating a pension comprises of adding to / traversing +- 15 tables, recalculating on many levels, updating other tables, and finally (in most circumstances) commit everything as a single transaction to the database. I need to be able to add entities / and yet retrieve them as if they were part of my collection. This works perfectly for deleted / modified entities, but not for added entities. How can I do this with Lightspeed? Many thanks Anthony |
|
|
Hi Anthony, Ah, I understand now. The new entities are not being returned from the query because they are not yet in the database. What you need to do is to call SaveChanges after adding the entities. If you do this within a transaction then you can retrieve them through querying but only commit at the end. Cheers, Andrew. |
|