summaryrefslogtreecommitdiff
path: root/Program.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-06-05 07:01:44 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-06-05 07:01:44 +0300
commit14312cb5c6f3f21742750e501adf0bb48522b1d7 (patch)
tree61ec7317bf48cf71b9f122dbac62d8af566f4d6a /Program.cs
parente5416aff886957886ab2a6a7e27320bed49a48bd (diff)
Add thumbnail file creation
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Program.cs b/Program.cs
index 361be3e..d3db670 100644
--- a/Program.cs
+++ b/Program.cs
@@ -1,7 +1,9 @@
using Microsoft.EntityFrameworkCore;
using MyDarling.Models;
+using MyDarling.Services;
using Microsoft.AspNetCore.Identity;
+
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<DataContext>(opts =>
@@ -25,6 +27,7 @@ builder.Services.Configure<IdentityOptions>( opts =>
opts.User.AllowedUserNameCharacters = "abcdefghijklmnopqrstuvwxyz";
});
+builder.Services.AddTransient<IImageResizer, ImageResizer>();
builder.Services.AddControllersWithViews();
builder.Services.AddRazorPages();