Generic Service
JSON Reference loop Events
This commit is contained in:
@@ -7,9 +7,9 @@ using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Hosting.Internal;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace LaDOSE.Api
|
||||
{
|
||||
public class Program
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace LaDOSE.Api
|
||||
var MySqlUser = this.Configuration["MySql:User"];
|
||||
var MySqlPassword = this.Configuration["MySql:Password"];
|
||||
services.AddCors();
|
||||
services.AddMvc();
|
||||
services.AddMvc().AddJsonOptions(x => x.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);
|
||||
services.AddDbContextPool<LaDOSEDbContext>( // replace "YourDbContext" with the class name of your DbContext
|
||||
options => options.UseMySql($"Server={MySqlServer};Database={MySqlDatabase};User={MySqlUser};Password={MySqlPassword};", // replace with your Connection String
|
||||
mysqlOptions =>
|
||||
|
||||
Reference in New Issue
Block a user