RESTFUL WEB API USING ASP.NET CORE 2.0 WITH MSSQL(using Dapper)
Maheshi Gunarathne
38812

Great work!!

________________________________________

In ConfigureServices method add:

services.AddCors(options =>

{

options.AddPolicy(“AllowAll”, p =>

{

p.AllowAnyOrigin()

.AllowAnyHeader()

.AllowAnyMethod();

});

});

__________________________________________________

and Configure function add :

app.UseCors(“AllowAll”);

This is will help with cross-origin if you using external calls eg Angular.