Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1061: 'KentAccommodation' does not contain a definition for 'Type' and no accessible extension method 'Type' accepting a first argument of type 'KentAccommodation' could be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 40:                     SummaryImage = accommodationModel.SummaryImage,
Line 41:                     Rating = accommodationModel.Rating != null ? Umbraco.GetPreValueAsString(Int32.Parse(accommodationModel.Rating.ToString())) : null,
Line 42:                     Type = accommodationModel.Type.AsPublishedContent()?.FirstOrDefault()?.Name,
Line 43:                     Location = accommodationModel.Location,
Line 44:                 });

Source File: D:\wwwroot\dmo-gtp\wwwroot\Views\Kent\Partials\Modules\Favourite\_FavouriteResults.cshtml    Line: 42







Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0