Return to Snippet

Revision: 63060
at April 5, 2013 00:14 by kirstencris


Initial Code
MYourDataContext.AllInstances.YourInlineTableValuedFunctionString = (t1,t2) =>
{
var resultsList = new List<YourInlineTableValuedFunctionResult>
                  {
                     new YourInlineTableValuedFunctionResult(),
                     new YourInlineTableValuedFunctionResult()
                  };
return resultsList.AsQueryable();
}

Initial URL
http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.aspx

Initial Description
This example is for an  inline table value function with one string parameter
t1 is of type YourDataContext and t2 is of type string(hence the name of the mole method)

Initial Title
How to mock an inline table valued function in LINQ to SQL

Initial Tags
c#

Initial Language
C#