Skip to content

Correction in "Develop ASP.NET Core MVC apps" #13812

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

Merged
merged 2 commits into from
Aug 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ At its heart, ASP.NET Core apps map incoming requests to outgoing responses. At
ASP.NET Core MVC apps can use conventional routes, attribute routes, or both. Conventional routes are defined in code, specifying routing _conventions_ using syntax like in the example below:

```csharp
app.UseMvc(routes =>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ";" should not be there

app.UseMvc(routes =>
{
routes.MapRoute("default","{controller=Home}/{action=Index}/{id?}");
});
Expand Down Expand Up @@ -202,7 +202,7 @@ In addition to the built-in support for Areas, you can also use your own folder
ASP.NET Core uses built-in convention types to control its behavior. You can modify or replace these conventions. For example, you can create a convention that will automatically get the feature name for a given controller based on its namespace (which typically correlates to the folder in which the controller is located):

```csharp
FeatureConvention : IControllerModelConvention
public class FeatureConvention : IControllerModelConvention
{
public void Apply(ControllerModel controller)
{
Expand Down Expand Up @@ -468,7 +468,7 @@ public class Program
public static void Main(string[] args)
{
StartConnectionAsync();
_connection.On("receiveMessage", (arguments) =>;
_connection.On("receiveMessage", (arguments) =>
{
Console.WriteLine(\$"{arguments\[0\]} said: {arguments\[1\]}");
});
Expand Down