From fbf986bdfe6ac532e97d160cf48c2401bce63d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 25 Jan 2021 17:33:08 +0300 Subject: [PATCH] Rename pagemodel classes. --- eventhub/src/EventHub.Web/EventHubWebAutoMapperProfile.cs | 4 ++-- eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml | 4 ++-- eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml.cs | 4 ++-- eventhub/src/EventHub.Web/Pages/Events/New.cshtml | 2 +- eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs | 4 ++-- eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml | 4 ++-- .../src/EventHub.Web/Pages/Organizations/Index.cshtml.cs | 4 ++-- eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml | 2 +- eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml.cs | 6 +++--- .../{OrganizationProfile.cshtml => Profile.cshtml} | 2 +- .../{OrganizationProfile.cshtml.cs => Profile.cshtml.cs} | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) rename eventhub/src/EventHub.Web/Pages/Organizations/{OrganizationProfile.cshtml => Profile.cshtml} (90%) rename eventhub/src/EventHub.Web/Pages/Organizations/{OrganizationProfile.cshtml.cs => Profile.cshtml.cs} (83%) diff --git a/eventhub/src/EventHub.Web/EventHubWebAutoMapperProfile.cs b/eventhub/src/EventHub.Web/EventHubWebAutoMapperProfile.cs index 6457cef..a82e04f 100644 --- a/eventhub/src/EventHub.Web/EventHubWebAutoMapperProfile.cs +++ b/eventhub/src/EventHub.Web/EventHubWebAutoMapperProfile.cs @@ -8,8 +8,8 @@ namespace EventHub.Web { public EventHubWebAutoMapperProfile() { - CreateMap(); - CreateMap(); + CreateMap(); + CreateMap(); } } } diff --git a/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml b/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml index 18b146e..5eff7ed 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml +++ b/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml @@ -4,7 +4,7 @@ @using EventHub.Web.Pages.Events.Components.AttendeesArea @using EventHub.Web.Pages.Events.Components.RegistrationArea @using Microsoft.AspNetCore.Mvc.Localization -@model EventHub.Web.Pages.Events.Detail +@model EventHub.Web.Pages.Events.DetailPageModel @@ -14,7 +14,7 @@ @Model.Event.StartTime.ToLongDateString(), @Model.Event.StartTime.ToString("hh:mm")
- @L["OrganizedBy"] @Model.Event.OrganizationDisplayName + @L["OrganizedBy"] @Model.Event.OrganizationDisplayName
@Model.Event.Description diff --git a/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml.cs b/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml.cs index d286a21..7721093 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml.cs +++ b/eventhub/src/EventHub.Web/Pages/Events/Detail.cshtml.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Routing; namespace EventHub.Web.Pages.Events { - public class Detail : PageModel + public class DetailPageModel : PageModel { [BindProperty(SupportsGet = true)] public string Url { get; set; } @@ -16,7 +16,7 @@ namespace EventHub.Web.Pages.Events private readonly IEventAppService _eventAppService; private readonly LinkGenerator _linkGenerator; - public Detail( + public DetailPageModel( IEventAppService eventAppService, LinkGenerator linkGenerator) { diff --git a/eventhub/src/EventHub.Web/Pages/Events/New.cshtml b/eventhub/src/EventHub.Web/Pages/Events/New.cshtml index 9f7e10a..de3b2e7 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/New.cshtml +++ b/eventhub/src/EventHub.Web/Pages/Events/New.cshtml @@ -2,7 +2,7 @@ @inject IHtmlLocalizer L @using EventHub.Localization @using Microsoft.AspNetCore.Mvc.Localization -@model EventHub.Web.Pages.Events.New +@model EventHub.Web.Pages.Events.NewPageModel

@L["NewEvent"]

diff --git a/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs b/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs index 7248101..e13923e 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs +++ b/eventhub/src/EventHub.Web/Pages/Events/New.cshtml.cs @@ -12,7 +12,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; namespace EventHub.Web.Pages.Events { - public class New : EventHubPageModel + public class NewPageModel : EventHubPageModel { [BindProperty] public NewEventViewModel Event { get; set; } @@ -22,7 +22,7 @@ namespace EventHub.Web.Pages.Events private readonly IEventAppService _eventAppService; private readonly IOrganizationAppService _organizationAppService; - public New( + public NewPageModel( IEventAppService eventAppService, IOrganizationAppService organizationAppService) { diff --git a/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml b/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml index 39eff60..e8a58d3 100644 --- a/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml +++ b/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml @@ -2,7 +2,7 @@ @inject IHtmlLocalizer L @using EventHub.Localization @using Microsoft.AspNetCore.Mvc.Localization -@model EventHub.Web.Pages.Organizations.Index +@model EventHub.Web.Pages.Organizations.IndexPageModel @foreach (var organization in Model.Organizations) @@ -15,7 +15,7 @@ @organization.Description.TruncateWithPostfix(100) - @L["SeeOrganization"] + @L["SeeOrganization"] diff --git a/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml.cs b/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml.cs index de02423..d88f4bf 100644 --- a/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml.cs +++ b/eventhub/src/EventHub.Web/Pages/Organizations/Index.cshtml.cs @@ -5,13 +5,13 @@ using Volo.Abp.Application.Dtos; namespace EventHub.Web.Pages.Organizations { - public class Index : EventHubPageModel + public class IndexPageModel : EventHubPageModel { public IReadOnlyList Organizations { get; set; } private readonly IOrganizationAppService _organizationAppService; - public Index(IOrganizationAppService organizationAppService) + public IndexPageModel(IOrganizationAppService organizationAppService) { _organizationAppService = organizationAppService; } diff --git a/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml b/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml index e7f8dee..1cf9ec9 100644 --- a/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml +++ b/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml @@ -2,6 +2,6 @@ @inject IHtmlLocalizer L @using EventHub.Localization @using Microsoft.AspNetCore.Mvc.Localization -@model EventHub.Web.Pages.Organizations.New +@model EventHub.Web.Pages.Organizations.NewPageModel

@L["NewOrganization"]

diff --git a/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml.cs b/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml.cs index 10df2af..9eb6e89 100644 --- a/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml.cs +++ b/eventhub/src/EventHub.Web/Pages/Organizations/New.cshtml.cs @@ -9,14 +9,14 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; namespace EventHub.Web.Pages.Organizations { [Authorize] - public class New : EventHubPageModel + public class NewPageModel : EventHubPageModel { [BindProperty] public CreateOrganizationViewModel Organization { get; set; } private readonly IOrganizationAppService _organizationAppService; - public New(IOrganizationAppService organizationAppService) + public NewPageModel(IOrganizationAppService organizationAppService) { _organizationAppService = organizationAppService; } @@ -35,7 +35,7 @@ namespace EventHub.Web.Pages.Organizations var input = ObjectMapper.Map(Organization); await _organizationAppService.CreateAsync(input); - return RedirectToPage("./OrganizationProfile", new {name = Organization.Name}); + return RedirectToPage("./Profile", new {name = Organization.Name}); } catch (Exception exception) { diff --git a/eventhub/src/EventHub.Web/Pages/Organizations/OrganizationProfile.cshtml b/eventhub/src/EventHub.Web/Pages/Organizations/Profile.cshtml similarity index 90% rename from eventhub/src/EventHub.Web/Pages/Organizations/OrganizationProfile.cshtml rename to eventhub/src/EventHub.Web/Pages/Organizations/Profile.cshtml index 4aadd5d..fa9e8bc 100644 --- a/eventhub/src/EventHub.Web/Pages/Organizations/OrganizationProfile.cshtml +++ b/eventhub/src/EventHub.Web/Pages/Organizations/Profile.cshtml @@ -2,7 +2,7 @@ @inject IHtmlLocalizer L @using EventHub.Localization @using Microsoft.AspNetCore.Mvc.Localization -@model EventHub.Web.Pages.Organizations.OrganizationProfile +@model EventHub.Web.Pages.Organizations.ProfilePageModel

@Model.Organization.DisplayName @Model.Organization.Name

diff --git a/eventhub/src/EventHub.Web/Pages/Organizations/OrganizationProfile.cshtml.cs b/eventhub/src/EventHub.Web/Pages/Organizations/Profile.cshtml.cs similarity index 83% rename from eventhub/src/EventHub.Web/Pages/Organizations/OrganizationProfile.cshtml.cs rename to eventhub/src/EventHub.Web/Pages/Organizations/Profile.cshtml.cs index d7e77a0..1136904 100644 --- a/eventhub/src/EventHub.Web/Pages/Organizations/OrganizationProfile.cshtml.cs +++ b/eventhub/src/EventHub.Web/Pages/Organizations/Profile.cshtml.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace EventHub.Web.Pages.Organizations { - public class OrganizationProfile : PageModel + public class ProfilePageModel : PageModel { [BindProperty(SupportsGet = true)] public string Name { get; set; } @@ -14,7 +14,7 @@ namespace EventHub.Web.Pages.Organizations private readonly IOrganizationAppService _organizationAppService; - public OrganizationProfile(IOrganizationAppService organizationAppService) + public ProfilePageModel(IOrganizationAppService organizationAppService) { _organizationAppService = organizationAppService; }