何らかの理由で、OPTIONを追加するための構文を正しく取得できません
Database db = DatabaseFactory.CreateDatabase(Config.DbConnectionString);
using (DbCommand cmd = db.GetSqlStringCommand(string.Format(@" SELECT t.customerID,
t.Photo
FROM SomeTable t
WHERE t.PhotoID = (SELECT MAX(PhotoID) FROM SomeTable WHERE customerID = @{0} OPTION (OPTIMIZE FOR UNKNOWN)
GROUP BY CustomerID ) ", "customerID")))
{
try
{
db.AddInParameter(cmd, "@customerID", DbType.String, customerID);