Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COI've created a simple interface for my MessageContext which looks like this: [IMessageContext](http://imgur.com/WTBebN3,oP7TyLe) How do I inject it into the repository, and how do I force it to return appropritate in-memory data? I'm not sure how injecting works, should I add it in my `MessageRepository` constructor?: [MessageRepository](http://imgur.com/WTBebN3,oP7TyLe#1)
      singulars
    2. COYes, you should add it to your `MessageRepository` ctor. DON'T use DbSet<T>! Change it to IDbSet<T>. In order to return in-memory data you have two options 1) use some mocking framework like Moq or NSubstitute 2) create your own InMemoryMessageContext implemetation of IMessageContext interface and InMemoryDbSet<T> implementation of IDbSet<T> interface. Setup everything together and fill InMemoryDbSet<T> with data.
      singulars
    3. COI've changed to IDbSet in my `IMessageContext` and filled the set. Used [FakeDbSet](http://imgur.com/sufQt1o/). But I'm having some problem adding my IMessageRepository to the MessageRepository ctor. I did it like this : http://imgur.com/Q6xb5ag , but after that I had some problems because I got `MessageRepository` in my `CustomerService` ctor, which now need 2 arguments `MessageContext` and `IMessageContext`. I can't add `IMessageContext` as an argument because it is an interface. I think I'm doing something wrong when I'm adding `IMessageContext` to `MessageRepository` ctor.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload