MSTest is functioning , all tests green
This commit is contained in:
@ -14,6 +14,7 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace H_Plus_Sports
|
||||
{
|
||||
@ -35,7 +36,10 @@ namespace H_Plus_Sports
|
||||
services.AddScoped<IProductRepository, ProductRepository>();
|
||||
services.AddScoped<ISalespersonRepository, SalespersonRepository>();
|
||||
|
||||
services.AddMvc();
|
||||
services.AddMvc(option => option.EnableEndpointRouting = false)
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
|
||||
.AddNewtonsoftJson(opt => opt.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore);
|
||||
|
||||
services.AddControllers();
|
||||
var connection = "Server=tcp:hsportsoeman.database.windows.net,1433;Initial Catalog=H_Plus_Sports;Persist Security Info=False;User ID=saTfoman;Password=Jes@lin78;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;";
|
||||
services.AddDbContext<H_Plus_SportsContext>(options => options.UseSqlServer(connection));
|
||||
|
||||
Reference in New Issue
Block a user