When i try to setup the the moq object like this:
mock.Setup(reader => reader.listOFs(1)).Returns(new List<IIAM_OF_Event>() { new IIAM_OF_Event() { ID = 11 } }.AsQueryable());
It throws
System.TypeInitializationException: The type initializer for 'Moq.ProxyFactory' threw an exception. ---
System.TypeInitializationException: The type initializer for 'Moq.CastleProxyFactory' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'Castle.Core, Version=4.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
IIAM_OF_Event
is an Linq table.