Changeset 057037b for backend/Program.cs
- Timestamp:
- 04/11/22 15:29:19 (2 years ago)
- Branches:
- master
- Children:
- 7a983b0
- Parents:
- b66b3ac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
backend/Program.cs
rb66b3ac r057037b 4 4 using Microsoft.EntityFrameworkCore; 5 5 using Microsoft.OpenApi.Models; 6 using Swashbuckle.AspNetCore.Swagger;7 6 using WebApi.Helpers; 8 7 … … 11 10 // Add services to the container. 12 11 builder.Services.Configure<AppSettings>(builder.Configuration.GetSection("AppSettings")); 13 builder.Services.AddControllers() ;12 builder.Services.AddControllers().AddNewtonsoftJson(); 14 13 // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 15 14 builder.Services.AddEndpointsApiExplorer(); … … 45 44 }); 46 45 builder.Services.AddScoped<IUserService, UserService>(); 46 builder.Services.AddScoped<IRestaurantService, RestaurantService>(); 47 builder.Services.AddScoped<IReservationService, ReservationService>(); 48 builder.Services.AddScoped<ISmsService, SmsService>(); 47 49 48 50 builder.Services.AddDbContext<DataContext>(p => p.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
Note:
See TracChangeset
for help on using the changeset viewer.