dotnet / dotnet/Scaffolding

error CS1646: Keyword, identifier, or string expected after verbatim specifier: @ in scaffolded pages

Open
#1,635 0 comments 0 reactions 1 assignee Claimed by @deepchoudhery View on GitHub
area-scaffolding customer-reported
Dominant language
C#
Stars
818
Forks
260
Avg merge
1d 8h
Merged PRs (30d)
10

Description

Using the scaffolding, either from the CLI or within Visual Studio, the parameter generated for `Include` methods is the `@` symbol e.g
```
Property = await _context.Properties
.Include(@ => @.City).FirstOrDefaultAsync(m => m.Id == id);
```

Sample project: https://github.com/mikebrind/Razor-Pages-In-Action/tree/main/Chapter08/LINQQuery.

To repo, scaffold Razor Pages using Entity Framework (CRUD), into the _Pages/PropertyManager_ folder, specifying the Property (CityBreaks.Models) class and the CityBreaksContext.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.