Error after Dropping in RhinoMocks when used with a Unit of Work and Repository pattern

50 views
Skip to first unread message

Brent Pabst

unread,
Jan 13, 2013, 9:09:31 PM1/13/13
to rhino...@googlegroups.com
Hi,

I've got a repository pattern and unit of work pattern in place for my data layer.  I have another layer which performs most of the heavy lifting logic and calls to the Unit of Work object in the data layer.  I am building unit tests for the logic layer.  I just dumped Rhino Mocks into the project and setup my project.  All of the code validates but when I try to build the project the compiler blows up.  I've not seen the error below before.  Any ideas what I might be doing wrong?

The type 'Merlin.Data.Models.System.User' must be a reference type in order to use it as parameter 'T' in the generic type or method 'Merlin.Data.Interfaces.IRepository<T>'

My class file is viewable here: https://gist.github.com/4527284 

Mark Wilkinson

unread,
Jan 13, 2013, 10:26:57 PM1/13/13
to rhino...@googlegroups.com
is your User class a struct?

if so what happens when you change it to a class.

-- 
Mark Wilkinson
Sent with Sparrow

--
You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rhinomocks/-/tEJJfYGuc88J.
To post to this group, send email to rhino...@googlegroups.com.
To unsubscribe from this group, send email to rhinomocks+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.

Brent Pabst

unread,
Jan 13, 2013, 11:11:34 PM1/13/13
to rhino...@googlegroups.com
No,
 
Its a class.
 
Sent from my Windows 8 PC
Reply all
Reply to author
Forward
0 new messages