You're almost there. You have the right idea, but you missed the execution of the idea a little bit. 


public class ClientCustomer
{
  public ClientCustomer(ICustomer c)
  {
    this.customer = c;
  }

  public string Name



You've put a boundary in between yourself and the third party interface, but then you've turned around and coded against an implementation. We should code against interfaces whenever possible. 

Right now you're probably confused. 


  But I can't code against that interface. I need to insulate myself from it. 


You're right. You do need to insulate yourself from the third party interface. It's their boundary, not yours. You need the Adapter pattern. 

You need to create your own interface that your code will work with. 

interface IClientCustomer
{
    string Name { get; }
}


Then your class implements your interface. 

public class ClientCustomer : IClientCustomer


And all of the client code works with classes implementing the IClientCustomer interface. 

  public ViewModel(ICustomerService svc)
  {
    this.svc = svc;
    Customers = new List&lt;IClientCustomer&gt;();


This way, if you ever swap the libraries out, you're truly insulated. You create a new class that implements your interface and it is much easier to swap one for another. If you make this small change, I'd say you've got it right. 

Wrapper classes for objects returned by 3rd party APIs
I heard multiple times not to reuse the same IV and IV should be random but doesn't need to be secret. I also heard if the IV is something like sequential numbers or something predictable I should hash(salt+pepper) it. Why on earth should i be doing that if they don't need to be a secret?

In this specific case i am encrypting rows with one secret AES key and i am using a fixed IV but xor-ing it with the row id. Its predictable and not secret but by doing this it isn't reused which i thought was the important part.

Are IVs suppose to be secret? Are predictable IVs ok? Should i be hashing predictable IV?
