Hi,
I'm currently migrating an MVC 5 project to .NET 6 and I'm having some issues with some of the extensions methods usedin MVC5 due to some classes being deprecated.
Previously we were setting someclasses on the row using a couple of extension methods:
C# Extension method
public static void HighlightRows<T>(this GridRow<T> row, IEnumerable<Tuple<Func<T, bool>, string>> expressions)
where T : VM
{
var classes = new List<string>();
foreach (var expression in expressions)
{
if (expression.Item1(row.DataItem))
{
if (!String.IsNullOrEmpty(expression.Item2) && classes.Count == 0)
classes.Add(expression.Item2);
}
}
if (classes.Count > 0)
row.HtmlAttributes["class"] = String.Join(" ", classes);
}And usage:
@(Html.Kendo().Grid(Model.Entities)
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.Name);
columns.Bound(c => c.Status);
})
.RowAction(r =>
{
r.HighlightRow(new[]
{
// if status is complete then set row class to success(set background togreen) is status is error set background to red basically.
Tuple.Create<Func<MyVm, bool>, string, string>(m => m.Status == "Complete, "success class"),
Tuple.Create<Func<MyVm, bool>, string, string>(m => m.Status == "Error", "errorclass"),
});
})Is there a migration guide from MVC5 to ASP.NET Core regarding the telerik packages or some list with what was deprecated? What's deprecated, what to use in the new version etc ?