Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrderBy produces error. #124

Closed
Gaelmart opened this issue Nov 18, 2017 · 2 comments
Closed

OrderBy produces error. #124

Gaelmart opened this issue Nov 18, 2017 · 2 comments

Comments

@Gaelmart
Copy link

Gaelmart commented Nov 18, 2017

Very simple trial

userData = userData.OrderBy("UserName");

OrderBy is underlinded in red in VS2017

The type arguments for method 'Enumerable.OrderBy<TSource, TKey>(IEnumerable, Func<TSource, TKey>)' cannot be inferred from the usage.

My imports:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.Logging;
using DNTBreadCrumb.Core;
using HRPTradeCombo.Models.DataViewModels;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using HRPTradeCombo.Models;
using Microsoft.AspNetCore.Routing;
using HRPTradeCombo.Data.EntityModel;
using Microsoft.AspNetCore.Identity;
using HRPTradeCombo.CommonClasses;
using System.Linq.Dynamic;
@StefH
Copy link
Collaborator

StefH commented Nov 18, 2017

When using this project, be sure to add using System.Linq.Dynamic.Core;

@Gaelmart
Copy link
Author

Great catch.
Thanks

@StefH StefH closed this as completed Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants