Ну и пример работы с материализацией.
public List
{
if (!ConfigSettings.UseSecurity)
{
return baseObjectIds;
}
List
using (
DbCommand command = Context.CreateStoreCommand("SP_CheckAccessToObjects",
CommandType.StoredProcedure,
new object[]
{
new SqlParameter("objIds",baseObjectIds.ConcatenateIdentifiers())
}))
{
try
{
if (command.Connection.State == ConnectionState.Closed)
{
command.Connection.Open();
}
result = new List
}
catch (Exception ex)
{
Logger.Error(ex);
result = new List
}
}
return result;
}