SQL Server Compact does not support identity column when it is used with the Entity Framework so I must generate the identity value manually. I did as follows:
DatabaseEntities de = new DatabaseEntities();
Income income = new Income();
income.Id = de.Incomes.Max(f => f.Id) + 1;
income.Time = DateTime.Today;
de.SaveChanges();
I think this is the simplest way but it is not success. I think my problem come from identity value generation. Please help me.