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
|
Using the nightly build from two days ago (because of the null reference bug) LightSpeed designer just deletes the model.cs it created, leaving only the .diagram file. I can see the model.cs file in the recycle bin. Of course i cannot access any domain objects... |
|
|
I should mention that this happens again and again so it's impossible to do any work. |
|
|
Switching nightly builds solved the issue. |
|
|
Switching builds solved the issue. I get the following SqlException: "Cannot insert the value NULL into column 'Id', table '[...].Subject'; column does not allow nulls. INSERT fails. My code is: static void Main(string[] args) Why is that? |
|
|
With neither the entity nor the table definition it's hard to be sure, but I'm guessing that the Subject.Id column in the database is not an identity / autoincrement column. You've specified the IdentityColumn identity method in your LightSpeedContext, so LightSpeed doesn't send an Id when you do a SaveChanges, expecting the database to supply one instead. Note that the designer Update Database feature will never generate the Id column as identity / autoincrement. If you're using model-first and IdentityColumn, you'll need to alter the table by hand. (But if you're doing model-first you presumably have control over the database schema and should therefore not be using IdentityColumn anyway.) |
|