|
|
|
LINQ добавление экземпляра
|
|||
|---|---|---|---|
|
#18+
Есть БД в которой 2 таблицы Users и Messages. Они связаны по id юзера. В проэкте я создал enity модель данных. Дело в том, что юзера я могу добавить, а сообщение нет, получаю исключение "An error occurred while updating the entries. See the inner exception for details.". Вот кусок кода: DBEntities db = new DBEntities(); Messages msg = new Messages(); DateTime now = new DateTime(); msg.msg_text = "некий текст"; msg.msg_date = now.Date; msg.msg_usr_id = 1; db.AddToMessages(msg); db.SaveChanges(); Помогите. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2011, 18:29 |
|
||
|
LINQ добавление экземпляра
|
|||
|---|---|---|---|
|
#18+
Semp, Видимо истина скрывается тут - See the inner exception for details. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2011, 19:55 |
|
||
|
|

start [/forum/topic.php?fid=17&gotonew=1&tid=1350924]: |
0ms |
get settings: |
6ms |
get forum list: |
12ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
169ms |
get topic data: |
8ms |
get first new msg: |
5ms |
get forum data: |
2ms |
get page messages: |
30ms |
get tp. blocked users: |
1ms |
| others: | 204ms |
| total: | 441ms |

| 0 / 0 |
