using Microsoft.EntityFrameworkCore;
using PetMedications.BusinessServices;
using PetMedications.DataRepositories;
using PetMedications.Interfaces;
var builder = co.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddDbContext<InventoryDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddScoped<IInventoryRepository, InventoryRepository>();
builder.Services.AddScoped<IMedicationService, MedicationService>();
var app = builder.Build();
if (app.Environment.IsDevelopment())
app.UseHttpsRedirection();