But not anonymous types. So, this should still throw, but with a more descriptive exception:
public void ExecuteTakesTVP(IEnumerable<string> args)
{
connection.Execcute().usp_TakesTVP(args.Select(s => new { Name = s });
}
But this should pass NamedType as the table name, and dbo as the schema:
public class NamedType
{
public string Name { get; set; }
}
public void ExecuteTakesTVP(IEnumerable<string> args)
{
connection.Execcute().usp_TakesTVP(args.Select(s => new NamedType { Name = s });
}
But not anonymous types. So, this should still throw, but with a more descriptive exception:
But this should pass
NamedType
as the table name, anddbo
as the schema: