I have a problem with this construction, can not find how to rewrite it properly.
private SqlParameter op <T> (T? t, string name)
{
SqlParameter sp = new SqlParameter();
sp.IsNullable = true;
sp.ParameterName = name;
sp.Value = t.HasValue ? t.Value : Convert.DBNull;
return sp;
}