amenitiesExcel = dc.Hotel_Meals_TBLs.Select(Convert.ToInt32(a => a.CodeNumber)).Max();
Error 370 The type arguments for method 'System.Linq.Queryable.Select<TSource,TResult>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.Expression<System.Func<TSource,TResult>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
amenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => Convert.ToInt32(a.CodeNumber));
amenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => int.Parse(a.CodeNumber));
amenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => a.CodeNumber);
int amenitiesExcel = 0; amenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => (int?)a.CodeNumber)?? 0;
int TExcel = 0; TExcel = dc.Hotel_Meals_TBLs.Max(a => a.CodeNumber);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)