Skip to content

Commit 52efd55

Browse files
author
Jan Mattner
committed
Fix #71 Hard dependency to MVC setup
1 parent 408113c commit 52efd55

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/JsonApiDotNetCore/Extensions/IApplicationBuilderExtensions.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ namespace JsonApiDotNetCore.Routing
55
{
66
public static class IApplicationBuilderExtensions
77
{
8-
public static IApplicationBuilder UseJsonApi(this IApplicationBuilder app)
8+
public static IApplicationBuilder UseJsonApi(this IApplicationBuilder app, bool useMvc = true)
99
{
1010
app.UseMiddleware<RequestMiddleware>();
1111

12-
app.UseMvc();
12+
if (useMvc)
13+
{
14+
app.UseMvc();
15+
}
1316

1417
return app;
1518
}

0 commit comments

Comments
 (0)