|
|
@ -1,12 +1,13 @@
|
|
|
|
using API;
|
|
|
|
using API;
|
|
|
|
using API.Service;
|
|
|
|
using API.Service;
|
|
|
|
using DbContextLib;
|
|
|
|
using DbContextLib;
|
|
|
|
|
|
|
|
using DbDataManager.Service;
|
|
|
|
using Dto;
|
|
|
|
using Dto;
|
|
|
|
|
|
|
|
using Entities;
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
using Microsoft.AspNetCore.Mvc.Versioning;
|
|
|
|
using Microsoft.AspNetCore.Mvc.Versioning;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.OpenApi.Models;
|
|
|
|
using Microsoft.OpenApi.Models;
|
|
|
|
using ModelToEntities.Service;
|
|
|
|
|
|
|
|
using Shared;
|
|
|
|
using Shared;
|
|
|
|
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
@ -17,9 +18,9 @@ builder.Services.AddControllers();
|
|
|
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
|
|
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
builder.Services.AddScoped<IUserService<UserDTO>, UserDataService>();
|
|
|
|
builder.Services.AddScoped<IUserService<UserEntity>, UserDataService>();
|
|
|
|
builder.Services.AddScoped<IUserService<UserDTO>, UserDataServiceApi>();
|
|
|
|
builder.Services.AddScoped<IUserService<UserDTO>, UserDataServiceApi>();
|
|
|
|
builder.Services.AddScoped<IInquiryService<InquiryDTO>, InquiryDataService>();
|
|
|
|
builder.Services.AddScoped<IInquiryService<InquiryEntity>, InquiryDataService>();
|
|
|
|
builder.Services.AddScoped<IInquiryService<InquiryDTO>, InquiryDataServiceApi>();
|
|
|
|
builder.Services.AddScoped<IInquiryService<InquiryDTO>, InquiryDataServiceApi>();
|
|
|
|
builder.Services.AddDbContext<DbContext, UserDbContext>();
|
|
|
|
builder.Services.AddDbContext<DbContext, UserDbContext>();
|
|
|
|
builder.Services.AddDbContext<WebAPIDbContext>(options => options.UseInMemoryDatabase("appDb"));
|
|
|
|
builder.Services.AddDbContext<WebAPIDbContext>(options => options.UseInMemoryDatabase("appDb"));
|
|
|
|