This is my query on the sql server and everything works fine
select * from DetalleNotas
order by len(ColProduct), ColProduct
PROCT1
PROCT2
PROCT3
PROCT4
PROCT5
PROCT6
PROCT7
PROCT8
PROCT9
PROCT10
but I want my query in linq
I tried this and it does not work
var product = (from d in db.Product
orderby len(d.ColProduct), d.ColProduct
select new
{
product= d.product
});
only this query works
var product = (from d in db.Product
orderby d.ColProduct
select new
{
product= d.product
});
This is the result of my functional query
PROCT1
PROCT10
PROCT2
PROCT3
PROCT4
PROCT5
PROCT6
PROCT7
PROCT8
PROCT9