From e3a74ff18d71b5ad0a59a39454317ed1a2ad5b2a Mon Sep 17 00:00:00 2001 From: code liturgy Date: Thu, 17 Nov 2022 22:39:36 +0000 Subject: [PATCH] Rename old namespace --- .../Application/ApplicationUser/ApplicationUser.cs | 2 +- CodeLiturgy.Data.Application/Sites/EnvironmentType.cs | 2 +- CodeLiturgy.Data.Application/Sites/Site.cs | 2 +- CodeLiturgy.Data.Application/Sites/SiteCreate.cs | 2 +- CodeLiturgy.Data.Application/Sites/SiteDbExtensions.cs | 8 ++++++++ CodeLiturgy.Data.Application/Sites/SiteEnvironment.cs | 2 +- CodeLiturgy.Data.Application/Sites/SiteUnique.cs | 2 +- CodeLiturgy.Domain/DbContexts/SiteDbContext.cs | 3 +-- CodeLiturgy.Views/Controllers/SitesController.cs | 5 +++-- 9 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 CodeLiturgy.Data.Application/Sites/SiteDbExtensions.cs diff --git a/CodeLiturgy.Data.Application/Application/ApplicationUser/ApplicationUser.cs b/CodeLiturgy.Data.Application/Application/ApplicationUser/ApplicationUser.cs index abc4e00..8a2033c 100644 --- a/CodeLiturgy.Data.Application/Application/ApplicationUser/ApplicationUser.cs +++ b/CodeLiturgy.Data.Application/Application/ApplicationUser/ApplicationUser.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using BlueWest.Data; using BlueWest.Data.Application; -using CodeLiturgy.Data.Capital; +using CodeLiturgy.Data.Application; using MapTo; using Microsoft.AspNetCore.Identity; diff --git a/CodeLiturgy.Data.Application/Sites/EnvironmentType.cs b/CodeLiturgy.Data.Application/Sites/EnvironmentType.cs index bf421d3..4feacde 100644 --- a/CodeLiturgy.Data.Application/Sites/EnvironmentType.cs +++ b/CodeLiturgy.Data.Application/Sites/EnvironmentType.cs @@ -1,4 +1,4 @@ -namespace CodeLiturgy.Data.Capital; +namespace CodeLiturgy.Data.Application; public enum EnvironmentType { diff --git a/CodeLiturgy.Data.Application/Sites/Site.cs b/CodeLiturgy.Data.Application/Sites/Site.cs index b03d2de..b3416c2 100644 --- a/CodeLiturgy.Data.Application/Sites/Site.cs +++ b/CodeLiturgy.Data.Application/Sites/Site.cs @@ -2,7 +2,7 @@ using System; using System.ComponentModel.DataAnnotations.Schema; using MapTo; -namespace CodeLiturgy.Data.Capital +namespace CodeLiturgy.Data.Application { [MapFrom(new [] diff --git a/CodeLiturgy.Data.Application/Sites/SiteCreate.cs b/CodeLiturgy.Data.Application/Sites/SiteCreate.cs index 12faa2a..59a2e6c 100644 --- a/CodeLiturgy.Data.Application/Sites/SiteCreate.cs +++ b/CodeLiturgy.Data.Application/Sites/SiteCreate.cs @@ -1,6 +1,6 @@ using MapTo; -namespace CodeLiturgy.Data.Capital +namespace CodeLiturgy.Data.Application { [MapFrom(typeof(Site))] public partial class SiteCreate diff --git a/CodeLiturgy.Data.Application/Sites/SiteDbExtensions.cs b/CodeLiturgy.Data.Application/Sites/SiteDbExtensions.cs new file mode 100644 index 0000000..39bec40 --- /dev/null +++ b/CodeLiturgy.Data.Application/Sites/SiteDbExtensions.cs @@ -0,0 +1,8 @@ +namespace CodeLiturgy.Data.Application +{ + public static class SiteDbExtensions + { + + } +} + diff --git a/CodeLiturgy.Data.Application/Sites/SiteEnvironment.cs b/CodeLiturgy.Data.Application/Sites/SiteEnvironment.cs index a524aeb..6f6f18f 100644 --- a/CodeLiturgy.Data.Application/Sites/SiteEnvironment.cs +++ b/CodeLiturgy.Data.Application/Sites/SiteEnvironment.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace CodeLiturgy.Data.Capital +namespace CodeLiturgy.Data.Application { public class SiteEnvironment { diff --git a/CodeLiturgy.Data.Application/Sites/SiteUnique.cs b/CodeLiturgy.Data.Application/Sites/SiteUnique.cs index 4618e06..4b2c37e 100644 --- a/CodeLiturgy.Data.Application/Sites/SiteUnique.cs +++ b/CodeLiturgy.Data.Application/Sites/SiteUnique.cs @@ -1,7 +1,7 @@ using System; using MapTo; -namespace CodeLiturgy.Data.Capital +namespace CodeLiturgy.Data.Application { [MapFrom(typeof(Site))] diff --git a/CodeLiturgy.Domain/DbContexts/SiteDbContext.cs b/CodeLiturgy.Domain/DbContexts/SiteDbContext.cs index dd72c6c..c826a42 100644 --- a/CodeLiturgy.Domain/DbContexts/SiteDbContext.cs +++ b/CodeLiturgy.Domain/DbContexts/SiteDbContext.cs @@ -1,4 +1,4 @@ -using CodeLiturgy.Data.Capital; +using CodeLiturgy.Data.Application; using Microsoft.EntityFrameworkCore; using BlueWest.EfMethods; @@ -9,7 +9,6 @@ namespace CodeLiturgy.Domain { [EfGetOneBy(nameof(Site.Id), typeof(SiteUnique))] [EfGetOne(typeof(SiteUnique))] - [EfAddMethods(createType: typeof(SiteCreate), returnType: typeof(SiteUnique))] [EfGetMany(typeof(SiteUnique))] public DbSet Sites { get; set; } diff --git a/CodeLiturgy.Views/Controllers/SitesController.cs b/CodeLiturgy.Views/Controllers/SitesController.cs index fc38b05..1ff628b 100644 --- a/CodeLiturgy.Views/Controllers/SitesController.cs +++ b/CodeLiturgy.Views/Controllers/SitesController.cs @@ -1,5 +1,5 @@ using BlueWest.Data.Auth.Context.Users; -using CodeLiturgy.Data.Capital; +using CodeLiturgy.Data.Application; using CodeLiturgy.Domain; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -60,6 +60,7 @@ namespace CodeLiturgy.Views.Controllers return new NotFoundResult(); } + /* [ProducesResponseType(StatusCodes.Status201Created)] [ProducesResponseType(StatusCodes.Status406NotAcceptable)] [HttpPost] @@ -68,7 +69,7 @@ namespace CodeLiturgy.Views.Controllers var (success, site) = _siteDbContext.AddSite(siteToCreate); if (!success) return new BadRequestResult(); return CreatedAtRoute(nameof(GetSiteById), new {countryId = site.Id}, site); - } + }*/ } }