abe545 / CodeOnlyStoredProcedures

A library for easily calling Stored Procedures in .NET using only code (no xml or gui).
MIT License
4 stars 3 forks source link

In dynamic syntax, you can't pass a struct as a complex argument #64

Closed abe545 closed 8 years ago

abe545 commented 8 years ago

You should be able to do this:

public struct Args
{
    // we only check properties... should we check public fields on structs?
    public string Foo { get; set; }
    public int Bar { get; set; }
}
dbConnection.Execute().FooBar(new Args { Foo  = "Hello", Bar = 42 });

However, currently the library will throw an exception stating that the passed argument was not named.