Вопрос

I am a junior developer working on a .NET web application project. In one of the pages the user compiles several text fields and then presses a 'Save' button. The text fields on the page are mapped to the properties of an object. I have one object mapped to one table in the DB. We use a custom ORM that is working quite well. Sometimes, it happens that when the users saves the page data, the corresponding row in the DB is being duplicated.

Can you give me some suggestions on what it might be?

Это было полезно?

Решение

Hard to say without knowing more about your project. It's possible that objects are being treated as new when they shouldn't be, resulting in an Insert instead of an Update.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top