diff --git a/OliverBooth/Controllers/Blog/BlogApiController.cs b/OliverBooth/Controllers/Blog/BlogApiController.cs index 21eb070..c5ab926 100644 --- a/OliverBooth/Controllers/Blog/BlogApiController.cs +++ b/OliverBooth/Controllers/Blog/BlogApiController.cs @@ -1,6 +1,7 @@ using Humanizer; using Microsoft.AspNetCore.Mvc; using OliverBooth.Data.Blog; +using OliverBooth.Data.Web; using OliverBooth.Services; namespace OliverBooth.Controllers.Blog; @@ -14,14 +15,14 @@ namespace OliverBooth.Controllers.Blog; public sealed class BlogApiController : ControllerBase { private readonly IBlogPostService _blogPostService; - private readonly IBlogUserService _userService; + private readonly IUserService _userService; /// /// Initializes a new instance of the class. /// /// The . - /// The . - public BlogApiController(IBlogPostService blogPostService, IBlogUserService userService) + /// The . + public BlogApiController(IBlogPostService blogPostService, IUserService userService) { _blogPostService = blogPostService; _userService = userService; diff --git a/OliverBooth/Data/Blog/BlogContext.cs b/OliverBooth/Data/Blog/BlogContext.cs index 3f37b46..2d4b937 100644 --- a/OliverBooth/Data/Blog/BlogContext.cs +++ b/OliverBooth/Data/Blog/BlogContext.cs @@ -31,12 +31,6 @@ internal sealed class BlogContext : DbContext /// The collection of sessions. public DbSet Sessions { get; private set; } = null!; - /// - /// Gets the collection of users in the database. - /// - /// The collection of users. - public DbSet Users { get; private set; } = null!; - /// protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { @@ -50,6 +44,5 @@ internal sealed class BlogContext : DbContext { modelBuilder.ApplyConfiguration(new BlogPostConfiguration()); modelBuilder.ApplyConfiguration(new SessionConfiguration()); - modelBuilder.ApplyConfiguration(new UserConfiguration()); } } diff --git a/OliverBooth/Data/Blog/Configuration/UserConfiguration.cs b/OliverBooth/Data/Blog/Configuration/UserConfiguration.cs index 7c16adf..47abe5c 100644 --- a/OliverBooth/Data/Blog/Configuration/UserConfiguration.cs +++ b/OliverBooth/Data/Blog/Configuration/UserConfiguration.cs @@ -1,5 +1,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; +using OliverBooth.Data.Web; namespace OliverBooth.Data.Blog.Configuration; diff --git a/OliverBooth/Data/Blog/IUser.cs b/OliverBooth/Data/Web/IUser.cs similarity index 98% rename from OliverBooth/Data/Blog/IUser.cs rename to OliverBooth/Data/Web/IUser.cs index 6fdedd6..e021546 100644 --- a/OliverBooth/Data/Blog/IUser.cs +++ b/OliverBooth/Data/Web/IUser.cs @@ -1,4 +1,4 @@ -namespace OliverBooth.Data.Blog; +namespace OliverBooth.Data.Web; /// /// Represents a user which can log in to the blog. diff --git a/OliverBooth/Data/Blog/User.cs b/OliverBooth/Data/Web/User.cs similarity index 97% rename from OliverBooth/Data/Blog/User.cs rename to OliverBooth/Data/Web/User.cs index 987e2e7..867935d 100644 --- a/OliverBooth/Data/Blog/User.cs +++ b/OliverBooth/Data/Web/User.cs @@ -2,8 +2,9 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Security.Cryptography; using System.Text; using Cysharp.Text; +using OliverBooth.Data.Blog; -namespace OliverBooth.Data.Blog; +namespace OliverBooth.Data.Web; /// /// Represents a user. diff --git a/OliverBooth/Data/Web/WebContext.cs b/OliverBooth/Data/Web/WebContext.cs index d5b74e4..4d54ea3 100644 --- a/OliverBooth/Data/Web/WebContext.cs +++ b/OliverBooth/Data/Web/WebContext.cs @@ -55,6 +55,12 @@ internal sealed class WebContext : DbContext /// The collection of templates. public DbSet