How to specify ServiceStack.OrmLite Parameter Length
Asked Answered
L

0

6

Using parameterized queries seems to set the length of the parameter to the length of the value passed in.

Doing something like:

var person = Connection.Query<People>("select * from People where Name = @name", 
                                      new { name = "Fred"});

Causes the parameter to be NVARCHAR(4), so the next query with a different length gets a miss on the cached plans and creates a new one.

How can I change it so it just uses a length I specify.

Lissa answered 22/10, 2012 at 14:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.