Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 05, 2013 05:19 AM by Young Yang - MSFT
Member
60 Points
57 Posts
Feb 26, 2013 01:23 PM|LINK
My repository layer method returns "abc" object in the following way
return this.context.abc.Include(x => x.xyz);
the return type is
abc
i want to mock this object so that it includes
xyz
as well.
private MockDbSet<abc> MockAbc()
{ return new MockDbSet<abc>
{ Builder<abc>.CreateNew().Build(),
Builder<abc>.CreateNew().Build(),
};
}
How can i include
while mocking it
All-Star
18647 Points
2647 Posts
Feb 26, 2013 03:04 PM|LINK
Post the code for your respository including the interface. It's difficult to offer advice without seeing your repository code.
21332 Points
1818 Posts
Microsoft
Mar 05, 2013 05:19 AM|LINK
You question is unclear, please post more details. But you can follow this tutorials first: http://msdn.microsoft.com/en-us/magazine/dd882516.aspx
Hope this helpful Regards
saadat Ali
Member
60 Points
57 Posts
Mocking EF entity with Include method
Feb 26, 2013 01:23 PM|LINK
My repository layer method returns "abc" object in the following way
the return type is
i want to mock this object so that it includes
as well.
}How can i include
while mocking it
CodeHobo
All-Star
18647 Points
2647 Posts
Re: Mocking EF entity with Include method
Feb 26, 2013 03:04 PM|LINK
Post the code for your respository including the interface. It's difficult to offer advice without seeing your repository code.
Blog | Twitter : @Hattan
Young Yang -...
All-Star
21332 Points
1818 Posts
Microsoft
Re: Mocking EF entity with Include method
Mar 05, 2013 05:19 AM|LINK
You question is unclear, please post more details. But you can follow this tutorials first: http://msdn.microsoft.com/en-us/magazine/dd882516.aspx
Hope this helpful
Regards
Feedback to us
Develop and promote your apps in Windows Store