none
EF doesn't have an auto-save function, correct? RRS feed

  • Question

  • I'm pretty sure I know the answer to this question already, but I want to double check.  Isn't it true that Entity Framework does not include any auto-save functionality?  That it is encumbent upon the developer using EF to write his/her own auto-saving functionality, correct?

    Rod

    Thursday, September 27, 2012 3:58 PM

Answers

  • Of course... Because EF can't decide when to save of discard changes. You can use timers if you need to save your data periodically.

    Hope this helps,

    Miguel.

    • Marked as answer by Rod at Work Thursday, September 27, 2012 5:01 PM
    Thursday, September 27, 2012 4:15 PM
  • Hi,

    Not sure what you call an autosave feature in the EF context. It does save when you ask for it.

    It can't autosave because autosaving is an application requirement. A developper knows how and when the app could auto-save. EF can't do that (for example deciding to auto-save when you are still about to add related entities which needs to be saved in a single transaction).


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".

    • Marked as answer by Rod at Work Thursday, September 27, 2012 5:01 PM
    Thursday, September 27, 2012 4:58 PM

All replies

  • Of course... Because EF can't decide when to save of discard changes. You can use timers if you need to save your data periodically.

    Hope this helps,

    Miguel.

    • Marked as answer by Rod at Work Thursday, September 27, 2012 5:01 PM
    Thursday, September 27, 2012 4:15 PM
  • Hi,

    Not sure what you call an autosave feature in the EF context. It does save when you ask for it.

    It can't autosave because autosaving is an application requirement. A developper knows how and when the app could auto-save. EF can't do that (for example deciding to auto-save when you are still about to add related entities which needs to be saved in a single transaction).


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".

    • Marked as answer by Rod at Work Thursday, September 27, 2012 5:01 PM
    Thursday, September 27, 2012 4:58 PM