none
Encrypting and Decrypting in Entity Framework with WPF Databinding RRS feed

  • Question

  • I'm decrypting inbound data using the Materialized event but I can't find any event or override to encrypt outbound data during a EF4.2 context.SaveData(). Everywhere I've tried, encrypted data shows up in the UI due to WPF databinding.  It would be nice if there were a "DeMaterialize" event somewhere during a save.

    Have I missed the boat one this one?

    Sunday, February 12, 2012 8:15 PM

Answers

  • Hi Charlie240,

    Welcome to MSDN Forum.

    If you want to encrypting data before saving it into database, you can write the encrypting method in setter scope of the class. On the other hand, when you want to decrypting data before showing them in the UI, you can write the decrypting method in getter scope. This is my suggestion in EF, without event in WPF. I'm afraid I'm not familiar with WPF, so I may can't give you more suggestion about how to use event in WPF to do this. If you want to use event in WPF, I suggest you to post in WPF Forum, you may get more help there. I hope the information can help.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, February 14, 2012 6:45 AM
    Moderator