c# – Encrypting Data with interception of SQL instructions generated by Entity Framework


WPF Application, C#, MS SQL Server, Entity Framework 6. I need to encrypt all data from user input, and do it apart from business logic. I’ve come to interception of SQL Queries generated by transferring LINQ expressions to SQL, and changing data from them to encrypted, in order to store only encrypted data. I’d like to know if it even possible, and how… And how to decrypt them back and show user only plaintext. I can’t change this method – i.e. i MUST intercept queries. Yet another thing – i must use methods from System.Security.Cryptography.
I have read https://docs.microsoft.com/en-us/ef/ef6/fundamentals/logging-and-interception this article – we use EF version of 4.1, this will not work. I had even checked through source code of EF6 on Github to check if i can override SaveChanges() method