I want do that:
Code: Select all
var products = db.Styles.OrderBy(e => Guid.NewGuid()).ToList();
"Error on executing DbCommand."
InnerException: "The SELECT item identified by the ORDER BY number 1 contains a variable as part of the expression identifying a column position. Variables are only allowed when ordering by an expression referencing a column name."
I must get data from sql from this way:
Code: Select all
SELECT * FROM styles ORDER BY NEWID()
I bought you component and I like it. There is any way to do that in LinqConnect model?
Thanks
PS: My goal is get rows randomly, Im using Microsoft Sql Server