From fbaedd08df386bbd1bdab702331c7b6fcb85cb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 2 Oct 2026 16:58:22 +0300 Subject: [PATCH] =?UTF-8?q?Mappers=20ve=20nullable=20warning=20mesajlar?= =?UTF-8?q?=C4=B1=20giderildi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../McpDevelopAppService.cs | 2 +- .../NotificationApplicationMappers.cs | 11 + .../AiBots/AiBotMappers.cs | 16 + .../AuditLogs/AuditLogAppService.cs | 6 +- .../AuditLogs/AuditLogMappers.cs | 2 + .../Dashboard/DashboardAppService.cs | 3 +- .../CrudEndpointGenerateAppService.cs | 4 +- .../DeveloperKit/CustomEndpointAppService.cs | 15 +- .../DeveloperKit/DeveloperKitMappers.cs | 44 ++ .../Forum/ForumAppService.cs | 15 +- .../Forum/ForumMappers.cs | 16 + .../Identity/IdentityMappers.cs | 242 +++++++++ .../Identity/PlatformAccountAppService.cs | 8 +- .../Identity/PlatformIdentityAppService.cs | 2 +- .../Identity/PlatformProfileAppService.cs | 5 +- .../PlatformSignInResultExtensions.cs | 4 +- .../Intranet/IntranetAppService.cs | 2 +- .../Intranet/IntranetMappers.cs | 21 + .../ListFormJsonRowAppService.cs | 6 +- .../Administration/ListFormsAppService.cs | 4 +- .../ListFormCustomizationAppService.cs | 2 +- .../ListForms/ListFormDynamicApiAppService.cs | 4 +- .../ListForms/ListFormMappers.cs | 504 ++++++++++++------ .../ListForms/ListFormSeedDataSynchronizer.cs | 21 +- .../ListForms/ListFormSelectAppService.cs | 10 +- .../ListForms/ListFormWizardAppService.cs | 2 +- .../ListForms/ListFormWorkflowAppService.cs | 75 +-- .../ListForms/WizardSeedSynchronizer.cs | 11 +- .../Menu/MenuAppService.cs | 16 +- .../Menu/MenuMappers.cs | 18 + .../Note/NoteAppService.cs | 2 +- .../Note/NoteMappers.cs | 2 + .../Public/PublicMappers.cs | 41 ++ .../Tenants/PlatformTenantAppService.cs | 4 +- .../Videoroom/VideoroomMappers.cs | 2 + 35 files changed, 870 insertions(+), 272 deletions(-) diff --git a/api/modules/Sozsoft.Mcp/Sozsoft.Mcp.Application/McpDevelopAppService.cs b/api/modules/Sozsoft.Mcp/Sozsoft.Mcp.Application/McpDevelopAppService.cs index fc93fd17..5eb1488f 100644 --- a/api/modules/Sozsoft.Mcp/Sozsoft.Mcp.Application/McpDevelopAppService.cs +++ b/api/modules/Sozsoft.Mcp/Sozsoft.Mcp.Application/McpDevelopAppService.cs @@ -570,7 +570,7 @@ public class McpDevelopAppService( { Id = devRequest.Id, Title = devRequest.Title, - Status = devRequest.Status, + Status = devRequest.Status ?? string.Empty, Description = description, Images = images, Analysis = devRequest.Analysis, diff --git a/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationApplicationMappers.cs b/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationApplicationMappers.cs index 21aed796..fd1dcc39 100644 --- a/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationApplicationMappers.cs +++ b/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Application/NotificationApplicationMappers.cs @@ -82,6 +82,17 @@ public partial class CreateUpdateNotificationRuleDtoToNotificationRuleMapper : M return destination; } + [MapperIgnoreTarget(nameof(NotificationRule.DeleterId))] + [MapperIgnoreTarget(nameof(NotificationRule.DeletionTime))] + [MapperIgnoreTarget(nameof(NotificationRule.IsCustomized))] + [MapperIgnoreTarget(nameof(NotificationRule.IsDeleted))] + [MapperIgnoreTarget(nameof(NotificationRule.IsFixed))] + [MapperIgnoreTarget(nameof(NotificationRule.LastModificationTime))] + [MapperIgnoreTarget(nameof(NotificationRule.LastModifierId))] + [MapperIgnoreTarget(nameof(NotificationRule.NotificationType))] + [MapperIgnoreTarget(nameof(NotificationRule.Notifications))] + [MapperIgnoreTarget(nameof(NotificationRule.RecipientId))] + [MapperIgnoreTarget(nameof(NotificationRule.TenantId))] [MapperIgnoreTarget(nameof(NotificationRule.RecipientType))] public override partial void Map(CreateUpdateNotificationRuleDto source, NotificationRule destination); diff --git a/api/src/Sozsoft.Platform.Application/AiBots/AiBotMappers.cs b/api/src/Sozsoft.Platform.Application/AiBots/AiBotMappers.cs index 419b8ae0..3b18a9a0 100644 --- a/api/src/Sozsoft.Platform.Application/AiBots/AiBotMappers.cs +++ b/api/src/Sozsoft.Platform.Application/AiBots/AiBotMappers.cs @@ -7,8 +7,22 @@ namespace Sozsoft.Platform.AiBots; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class AiBotToAiBotDtoMapper : TwoWayMapperBase { + [MapperIgnoreTarget(nameof(AiBotDto.CreationTime))] + [MapperIgnoreTarget(nameof(AiBotDto.CreatorId))] + [MapperIgnoreTarget(nameof(AiBotDto.DeleterId))] + [MapperIgnoreTarget(nameof(AiBotDto.DeletionTime))] + [MapperIgnoreTarget(nameof(AiBotDto.IsDeleted))] + [MapperIgnoreTarget(nameof(AiBotDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(AiBotDto.LastModifierId))] public override partial AiBotDto Map(AiBot source); + [MapperIgnoreTarget(nameof(AiBotDto.CreationTime))] + [MapperIgnoreTarget(nameof(AiBotDto.CreatorId))] + [MapperIgnoreTarget(nameof(AiBotDto.DeleterId))] + [MapperIgnoreTarget(nameof(AiBotDto.DeletionTime))] + [MapperIgnoreTarget(nameof(AiBotDto.IsDeleted))] + [MapperIgnoreTarget(nameof(AiBotDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(AiBotDto.LastModifierId))] public override partial void Map(AiBot source, AiBotDto destination); public override void BeforeMap(AiBot source) @@ -19,8 +33,10 @@ public partial class AiBotToAiBotDtoMapper : TwoWayMapperBase { } + [MapperIgnoreTarget(nameof(AiBot.IsActive))] public override partial AiBot ReverseMap(AiBotDto destination); + [MapperIgnoreTarget(nameof(AiBot.IsActive))] public override partial void ReverseMap(AiBotDto destination, AiBot source); public override void BeforeReverseMap(AiBotDto destination) diff --git a/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogAppService.cs b/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogAppService.cs index 29791609..b5cc6de0 100644 --- a/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogAppService.cs +++ b/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogAppService.cs @@ -185,19 +185,19 @@ public class AuditLogAppService : CrudAppService< [RemoteService(IsEnabled = false)] public override Task CreateAsync(AuditLogDto input) { - return null; + throw new NotSupportedException(); } [RemoteService(IsEnabled = false)] public override Task UpdateAsync(Guid id, AuditLogDto input) { - return null; + throw new NotSupportedException(); } [RemoteService(IsEnabled = false)] public override Task DeleteAsync(Guid id) { - return null; + throw new NotSupportedException(); } } diff --git a/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogMappers.cs b/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogMappers.cs index 00aaf7c4..0d47d987 100644 --- a/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogMappers.cs +++ b/api/src/Sozsoft.Platform.Application/AuditLogs/AuditLogMappers.cs @@ -7,8 +7,10 @@ namespace Sozsoft.Platform.AuditLogs; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class AuditLogToAuditLogDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(AuditLogDto.EntityChangeCount))] public override partial AuditLogDto Map(AuditLog source); + [MapperIgnoreTarget(nameof(AuditLogDto.EntityChangeCount))] public override partial void Map(AuditLog source, AuditLogDto destination); public override void BeforeMap(AuditLog source) diff --git a/api/src/Sozsoft.Platform.Application/Dashboard/DashboardAppService.cs b/api/src/Sozsoft.Platform.Application/Dashboard/DashboardAppService.cs index a4fa93c3..0066d96c 100644 --- a/api/src/Sozsoft.Platform.Application/Dashboard/DashboardAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Dashboard/DashboardAppService.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Sozsoft.Platform.DynamicData; using Sozsoft.Platform.OrganizationUnits; +using Volo.Abp.Users; namespace Sozsoft.Platform.Dashboard; @@ -26,7 +27,7 @@ public class DashboardAppService : PlatformAppService public async Task> GetWidgetsAsync(DashboardWidgetsRequestDto requestDto) { - var ids = await OuRepository.GetOrganizationUnitIdsWithChildren(CurrentUser.Id.Value); + var ids = await OuRepository.GetOrganizationUnitIdsWithChildren(CurrentUser.GetId()); var results = await SpRepository.CallSpAsync("PDashboard_Widgets", "KIM", new Dictionary() { diff --git a/api/src/Sozsoft.Platform.Application/DeveloperKit/CrudEndpointGenerateAppService.cs b/api/src/Sozsoft.Platform.Application/DeveloperKit/CrudEndpointGenerateAppService.cs index a077f294..176db496 100644 --- a/api/src/Sozsoft.Platform.Application/DeveloperKit/CrudEndpointGenerateAppService.cs +++ b/api/src/Sozsoft.Platform.Application/DeveloperKit/CrudEndpointGenerateAppService.cs @@ -73,8 +73,8 @@ public class CrudEndpointGenerateAppService : CrudAppService< [Authorize(PlatformConsts.AppCodes.SqlQueryManagers.CrudEndpoints)] public virtual async Task> GenerateCrudEndpointsAsync( string entityName, - [FromQuery] string operationTypes = null, - [FromQuery] string objectType = null) + [FromQuery] string? operationTypes = null, + [FromQuery] string? objectType = null) { // Tablolar icin bes endpoint uretilir; operationTypes verilmisse yalnizca // listedekiler aktif baslar, digerleri pasif olarak kaydedilir ve diff --git a/api/src/Sozsoft.Platform.Application/DeveloperKit/CustomEndpointAppService.cs b/api/src/Sozsoft.Platform.Application/DeveloperKit/CustomEndpointAppService.cs index dcf441e1..9a42b5e8 100644 --- a/api/src/Sozsoft.Platform.Application/DeveloperKit/CustomEndpointAppService.cs +++ b/api/src/Sozsoft.Platform.Application/DeveloperKit/CustomEndpointAppService.cs @@ -39,6 +39,9 @@ public class CustomEndpointAppService : PlatformAppService this.defaultValueHelper = defaultValueHelper; } + private HttpContext HttpContext => httpContextAccessor.HttpContext + ?? throw new InvalidOperationException("HTTP Context bulunamadı."); + [HttpGet("{**path}")] [Authorize(PlatformConsts.AppCodes.DeveloperKits.Get)] public async Task GetAsync() @@ -74,7 +77,7 @@ public class CustomEndpointAppService : PlatformAppService try { // Request.Path = /api/app/custom-endpoint/yxcdfn/8 - var rawPath = httpContextAccessor.HttpContext.Request.Path.ToString(); + var rawPath = HttpContext.Request.Path.ToString(); var decodedPath = Uri.UnescapeDataString(rawPath); // URL decode işlemi var path = decodedPath @@ -102,7 +105,7 @@ public class CustomEndpointAppService : PlatformAppService } - Dictionary param = []; + Dictionary param = []; // Parametreler: // 1- Statik foreach (var item in api.Parameters.Where(a => a.Type == PlatformConsts.CustomEndpointConsts.ParameterTypes.Static)) @@ -112,7 +115,7 @@ public class CustomEndpointAppService : PlatformAppService } // 2- Query - var queryParams = httpContextAccessor.HttpContext.Request.Query; + var queryParams = HttpContext.Request.Query; foreach (var item in api.Parameters.Where(a => a.Type == PlatformConsts.CustomEndpointConsts.ParameterTypes.Query)) { if (queryParams.TryGetValue(item.Name, out var value)) @@ -214,10 +217,10 @@ public class CustomEndpointAppService : PlatformAppService /// accepted: the visual designer's Form sends the edited record as JSON, /// while older callers keep posting forms. /// - private async Task> ReadBodyValuesAsync() + private async Task> ReadBodyValuesAsync() { - var request = httpContextAccessor.HttpContext.Request; - var values = new Dictionary(StringComparer.OrdinalIgnoreCase); + var request = HttpContext.Request; + var values = new Dictionary(StringComparer.OrdinalIgnoreCase); if (request.HasFormContentType) { diff --git a/api/src/Sozsoft.Platform.Application/DeveloperKit/DeveloperKitMappers.cs b/api/src/Sozsoft.Platform.Application/DeveloperKit/DeveloperKitMappers.cs index 46e6115d..143a87c3 100644 --- a/api/src/Sozsoft.Platform.Application/DeveloperKit/DeveloperKitMappers.cs +++ b/api/src/Sozsoft.Platform.Application/DeveloperKit/DeveloperKitMappers.cs @@ -23,8 +23,40 @@ public partial class CustomComponentToCustomComponentDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(CustomComponent.DataSources))] + [MapperIgnoreTarget(nameof(CustomComponent.DeleterId))] + [MapperIgnoreTarget(nameof(CustomComponent.DeletionTime))] + [MapperIgnoreTarget(nameof(CustomComponent.IsDeleted))] + [MapperIgnoreTarget(nameof(CustomComponent.LastModificationTime))] + [MapperIgnoreTarget(nameof(CustomComponent.LastModifierId))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoCanonicalUrl))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoChangeFrequency))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoDescription))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoIncludeInSitemap))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoKeywords))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoNoIndex))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoOgImage))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoPriority))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoStructuredData))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoTitle))] public override partial CustomComponent Map(CreateUpdateCustomComponentDto source); + [MapperIgnoreTarget(nameof(CustomComponent.DataSources))] + [MapperIgnoreTarget(nameof(CustomComponent.DeleterId))] + [MapperIgnoreTarget(nameof(CustomComponent.DeletionTime))] + [MapperIgnoreTarget(nameof(CustomComponent.IsDeleted))] + [MapperIgnoreTarget(nameof(CustomComponent.LastModificationTime))] + [MapperIgnoreTarget(nameof(CustomComponent.LastModifierId))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoCanonicalUrl))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoChangeFrequency))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoDescription))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoIncludeInSitemap))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoKeywords))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoNoIndex))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoOgImage))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoPriority))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoStructuredData))] + [MapperIgnoreTarget(nameof(CustomComponent.SeoTitle))] public override partial void Map(CreateUpdateCustomComponentDto source, CustomComponent destination); public override void BeforeMap(CreateUpdateCustomComponentDto source) @@ -39,8 +71,10 @@ public partial class CreateUpdateCustomComponentDtoToCustomComponentMapper : Map [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class CrudEndpointToCrudEndpointDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(CrudEndpointDto.EntityDisplayName))] public override partial CrudEndpointDto Map(CrudEndpoint source); + [MapperIgnoreTarget(nameof(CrudEndpointDto.EntityDisplayName))] public override partial void Map(CrudEndpoint source, CrudEndpointDto destination); public override void BeforeMap(CrudEndpoint source) @@ -55,8 +89,18 @@ public partial class CrudEndpointToCrudEndpointDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(CrudEndpoint.DeleterId))] + [MapperIgnoreTarget(nameof(CrudEndpoint.DeletionTime))] + [MapperIgnoreTarget(nameof(CrudEndpoint.IsDeleted))] + [MapperIgnoreTarget(nameof(CrudEndpoint.LastModificationTime))] + [MapperIgnoreTarget(nameof(CrudEndpoint.LastModifierId))] public override partial CrudEndpoint Map(CreateUpdateCrudEndpointDto source); + [MapperIgnoreTarget(nameof(CrudEndpoint.DeleterId))] + [MapperIgnoreTarget(nameof(CrudEndpoint.DeletionTime))] + [MapperIgnoreTarget(nameof(CrudEndpoint.IsDeleted))] + [MapperIgnoreTarget(nameof(CrudEndpoint.LastModificationTime))] + [MapperIgnoreTarget(nameof(CrudEndpoint.LastModifierId))] public override partial void Map(CreateUpdateCrudEndpointDto source, CrudEndpoint destination); public override void BeforeMap(CreateUpdateCrudEndpointDto source) diff --git a/api/src/Sozsoft.Platform.Application/Forum/ForumAppService.cs b/api/src/Sozsoft.Platform.Application/Forum/ForumAppService.cs index e8e8479b..94294e40 100644 --- a/api/src/Sozsoft.Platform.Application/Forum/ForumAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Forum/ForumAppService.cs @@ -12,6 +12,7 @@ using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories; using Volo.Abp.Identity; using Volo.Abp.Uow; +using Volo.Abp.Users; namespace Sozsoft.Platform.Forum; @@ -266,8 +267,9 @@ public class ForumAppService : PlatformAppService, IForumAppService [UnitOfWork] public async Task CreateTopicAsync(CreateForumTopicDto input) { - var author = await _identityUserRepository.FindAsync(CurrentUser.Id.Value) - ?? throw new EntityNotFoundException(typeof(IdentityUser), CurrentUser.Id.Value); + var authorId = CurrentUser.GetId(); + var author = await _identityUserRepository.FindAsync(authorId) + ?? throw new EntityNotFoundException(typeof(IdentityUser), authorId); var jobPositionId = author.GetJobPositionId(); var jobPosition = jobPositionId == Guid.Empty ? null @@ -286,7 +288,7 @@ public class ForumAppService : PlatformAppService, IForumAppService input.Title, input.Content, input.CategoryId, - CurrentUser.Id.Value, + authorId, author.GetFullName(), jobPosition?.Name ?? string.Empty, author.Email ?? string.Empty, @@ -386,8 +388,9 @@ public class ForumAppService : PlatformAppService, IForumAppService [UnitOfWork] public async Task CreatePostAsync(CreateForumPostDto input) { - var author = await _identityUserRepository.FindAsync(CurrentUser.Id.Value) - ?? throw new EntityNotFoundException(typeof(IdentityUser), CurrentUser.Id.Value); + var authorId = CurrentUser.GetId(); + var author = await _identityUserRepository.FindAsync(authorId) + ?? throw new EntityNotFoundException(typeof(IdentityUser), authorId); var jobPositionId = author.GetJobPositionId(); var jobPosition = jobPositionId == Guid.Empty ? null @@ -405,7 +408,7 @@ public class ForumAppService : PlatformAppService, IForumAppService GuidGenerator.Create(), input.TopicId, input.Content, - CurrentUser.Id.Value, + authorId, author.GetFullName(), jobPosition?.Name ?? string.Empty, author.Email ?? string.Empty, diff --git a/api/src/Sozsoft.Platform.Application/Forum/ForumMappers.cs b/api/src/Sozsoft.Platform.Application/Forum/ForumMappers.cs index 4f2ecc98..d5d8e1f3 100644 --- a/api/src/Sozsoft.Platform.Application/Forum/ForumMappers.cs +++ b/api/src/Sozsoft.Platform.Application/Forum/ForumMappers.cs @@ -19,8 +19,14 @@ public partial class ForumCategoryToForumCategoryDtoMapper : TwoWayMapperBase { + [MapperIgnoreTarget(nameof(UserInfoViewModel.Alcohol))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.AlcoholNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.BirthDate))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.BirthPlace))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.BloodType))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ChildHealthNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ChildHealthStatus))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ChronicDisease))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ComplaintBackPain))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ComplaintChestPain))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ComplaintDiarrheaConstipation))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ComplaintDyspnea))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ComplaintJointPain))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ComplaintPalpitation))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ComplaintProductiveCough))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DepartmentId))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisDiabetes))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisFoodPoisoning))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisHearingLoss))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisHeartDisease))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisJaundice))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisKidneyDisease))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisNervousSystemDisease))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisPepticUlcer))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisSkinDisease))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DiagnosisVisionImpairment))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DisabilityPension))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.DisabilityPensionNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.District))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.EducationLevel))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamBloodPressure))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamCardiovascular))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamDigestive))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamEnt))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamEye))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamHeight))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamMusculoskeletal))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamNeurological))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamOther))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamPsychiatric))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamPulse))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamRespiratory))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamSensoryOrgans))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamSkin))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamUrogenital))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ExamWeight))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.FamilySequenceNo))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.FatherHealthNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.FatherHealthStatus))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.FatherName))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.FitForWorkCondition))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.FitForWorkJob))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.FitnessDoctorId))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.Gender))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.GraduationSchool))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HadSurgery))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HadSurgeryNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HadWorkAccident))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HadWorkAccidentNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HepatitisVaccination))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HireDate))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HomeAddress))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.Hospitalized))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.HospitalizedNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.IdentityNumber))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.IsVerified))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.IssuedDate))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.IssuedPlace))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.JobPositionId))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabAudiometry))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabBiologicalAnalysis))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabBlood))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabOther))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabPsychologicalTests))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabPulmonaryFunction))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabRadiological))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabRadiologicalPhysiological))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LabUrine))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LockUser))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.LoginEndDate))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.MaritalStatus))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.MarriageDate))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.MotherHealthNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.MotherHealthStatus))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.MotherName))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.Nationality))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.NightWorkFit))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.OccupationalDiseaseExam))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.OccupationalDiseaseExamNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.OtherVaccination))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.Province))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.RocketUsername))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.SequenceNo))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.SerialNo))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ShiftNightDoctorId))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.ShiftWorkFit))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.SiblingHealthNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.SiblingHealthStatus))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.Smoking))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.SmokingNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.SskNo))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.TelegramChatId))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.TerminationDate))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.TetanusVaccination))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.UnderTreatment))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.UnderTreatmentNote))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.UserType))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.Village))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.VolumeNo))] + [MapperIgnoreTarget(nameof(UserInfoViewModel.WorkHour))] [MapperIgnoreTarget(nameof(UserInfoViewModel.Roles))] [MapperIgnoreTarget(nameof(UserInfoViewModel.Branches))] [MapperIgnoreTarget(nameof(UserInfoViewModel.Claims))] @@ -22,6 +132,116 @@ public partial class IdentityUserToUserInfoViewModelMapper : MapperBase { + [MapperIgnoreTarget(nameof(OrganizationUnitDto.UserCount))] + [MapperIgnoreTarget(nameof(OrganizationUnitDto.Roles))] public override partial OrganizationUnitDto Map(OrganizationUnit source); + [MapperIgnoreTarget(nameof(OrganizationUnitDto.UserCount))] + [MapperIgnoreTarget(nameof(OrganizationUnitDto.Roles))] public override partial void Map(OrganizationUnit source, OrganizationUnitDto destination); public override void BeforeMap(OrganizationUnit source) @@ -61,8 +285,26 @@ public partial class OrganizationUnitToOrganizationUnitDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(OrganizationUnit.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(OrganizationUnit.CreationTime))] + [MapperIgnoreTarget(nameof(OrganizationUnit.CreatorId))] + [MapperIgnoreTarget(nameof(OrganizationUnit.DeleterId))] + [MapperIgnoreTarget(nameof(OrganizationUnit.DeletionTime))] + [MapperIgnoreTarget(nameof(OrganizationUnit.EntityVersion))] + [MapperIgnoreTarget(nameof(OrganizationUnit.IsDeleted))] + [MapperIgnoreTarget(nameof(OrganizationUnit.LastModificationTime))] + [MapperIgnoreTarget(nameof(OrganizationUnit.LastModifierId))] public override partial OrganizationUnit Map(CreateUpdateOrganizationUnitDto source); + [MapperIgnoreTarget(nameof(OrganizationUnit.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(OrganizationUnit.CreationTime))] + [MapperIgnoreTarget(nameof(OrganizationUnit.CreatorId))] + [MapperIgnoreTarget(nameof(OrganizationUnit.DeleterId))] + [MapperIgnoreTarget(nameof(OrganizationUnit.DeletionTime))] + [MapperIgnoreTarget(nameof(OrganizationUnit.EntityVersion))] + [MapperIgnoreTarget(nameof(OrganizationUnit.IsDeleted))] + [MapperIgnoreTarget(nameof(OrganizationUnit.LastModificationTime))] + [MapperIgnoreTarget(nameof(OrganizationUnit.LastModifierId))] public override partial void Map(CreateUpdateOrganizationUnitDto source, OrganizationUnit destination); public override void BeforeMap(CreateUpdateOrganizationUnitDto source) diff --git a/api/src/Sozsoft.Platform.Application/Identity/PlatformAccountAppService.cs b/api/src/Sozsoft.Platform.Application/Identity/PlatformAccountAppService.cs index 88183b7e..52db3f18 100644 --- a/api/src/Sozsoft.Platform.Application/Identity/PlatformAccountAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Identity/PlatformAccountAppService.cs @@ -87,7 +87,7 @@ User Detail: {userDetailUrl}"; { await emailSender.QueueEmailAsync( SenderEmailAddress, - new KeyValuePair(SenderName, SenderEmailAddress), + new KeyValuePair(SenderName ?? string.Empty, SenderEmailAddress ?? string.Empty), new { user.Email, @@ -153,7 +153,7 @@ User Detail: {await GetUserDetailUrlAsync(user.Id)}"; { await IdentityOptions.SetAsync(); - var user = await UserManager.FindByIdAsync(input.UserId.ToString()); + var user = await UserManager.FindByIdAsync(input.UserId.ToString() ?? string.Empty); if (user == null) { return false; @@ -171,7 +171,7 @@ User Detail: {await GetUserDetailUrlAsync(user.Id)}"; return result.Succeeded; } - private async Task SendConfirmationCodeAsync(IdentityUser user = null) + private async Task SendConfirmationCodeAsync(IdentityUser? user = null) { if (user == null && CurrentUser.IsAuthenticated && !CurrentUser.EmailVerified && CurrentUser.Id.HasValue) user = await UserManager.GetByIdAsync(CurrentUser.Id.Value); @@ -195,7 +195,7 @@ To validate your account, please complete your profile by clicking (or copy-past await emailSender.QueueEmailAsync( user.Email, - new KeyValuePair(SenderName, SenderEmailAddress), + new KeyValuePair(SenderName ?? string.Empty, SenderEmailAddress ?? string.Empty), new { user.Email, diff --git a/api/src/Sozsoft.Platform.Application/Identity/PlatformIdentityAppService.cs b/api/src/Sozsoft.Platform.Application/Identity/PlatformIdentityAppService.cs index 79699f15..9b38753a 100644 --- a/api/src/Sozsoft.Platform.Application/Identity/PlatformIdentityAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Identity/PlatformIdentityAppService.cs @@ -164,7 +164,7 @@ public class PlatformIdentityAppService : ApplicationService PhoneNumber = user.PhoneNumber, IsActive = user.IsActive, TwoFactorEnabled = user.TwoFactorEnabled, - IsVerified = (bool)user.ExtraProperties["IsVerified"], + IsVerified = user.GetIsVerified(), userRoleNames = userRoleNames, LockoutEnabled = user.LockoutEnabled, LockoutEnd = user.LockoutEnd, diff --git a/api/src/Sozsoft.Platform.Application/Identity/PlatformProfileAppService.cs b/api/src/Sozsoft.Platform.Application/Identity/PlatformProfileAppService.cs index 5d5ccda5..2b5b4ce9 100644 --- a/api/src/Sozsoft.Platform.Application/Identity/PlatformProfileAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Identity/PlatformProfileAppService.cs @@ -80,7 +80,10 @@ public class PlatformProfileAppService : ProfileAppService, IProfileAppService user.Surname = input.Surname; (await UserManager.UpdateAsync(user)).CheckErrors(); - await CurrentUnitOfWork.SaveChangesAsync(); + if (CurrentUnitOfWork != null) + { + await CurrentUnitOfWork.SaveChangesAsync(); + } return ObjectMapper.Map(user); } diff --git a/api/src/Sozsoft.Platform.Application/Identity/PlatformSignInResultExtensions.cs b/api/src/Sozsoft.Platform.Application/Identity/PlatformSignInResultExtensions.cs index 66c81ef3..0900c52e 100644 --- a/api/src/Sozsoft.Platform.Application/Identity/PlatformSignInResultExtensions.cs +++ b/api/src/Sozsoft.Platform.Application/Identity/PlatformSignInResultExtensions.cs @@ -27,7 +27,7 @@ public static class PlatformSignInResultExtensions return IdentitySecurityLogActionConsts.LoginNotAllowed; } - /// <-- Added + // <-- Added if (result is PlatformSignInResult resultP) { if (resultP.IsNotAllowed_NotVerified) @@ -67,7 +67,7 @@ public static class PlatformSignInResultExtensions return PlatformConsts.UserCannotSignInErrors.LoginNotAllowed_ConcurrentUserLimit; } } - /// Added --> + // Added --> if (!result.Succeeded) { diff --git a/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs b/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs index e3c7c586..11e17e93 100644 --- a/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs @@ -186,7 +186,7 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService .MapDepartmentAndJobPositionAssignments(departmentDict, jobPositionDict); } - private async Task GetDashboardFallbackUserAsync( + private async Task GetDashboardFallbackUserAsync( IReadOnlyDictionary departmentDict, IReadOnlyDictionary jobPositionDict) { diff --git a/api/src/Sozsoft.Platform.Application/Intranet/IntranetMappers.cs b/api/src/Sozsoft.Platform.Application/Intranet/IntranetMappers.cs index a9aece09..d5819516 100644 --- a/api/src/Sozsoft.Platform.Application/Intranet/IntranetMappers.cs +++ b/api/src/Sozsoft.Platform.Application/Intranet/IntranetMappers.cs @@ -7,10 +7,17 @@ namespace Sozsoft.Platform.Intranet; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class AnnouncementToAnnouncementDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(AnnouncementDto.IsLiked))] + [MapperIgnoreTarget(nameof(AnnouncementDto.User))] public override partial AnnouncementDto Map(Announcement source); + [MapperIgnoreTarget(nameof(AnnouncementDto.IsLiked))] + [MapperIgnoreTarget(nameof(AnnouncementDto.User))] public override partial void Map(Announcement source, AnnouncementDto destination); + [MapperIgnoreTarget(nameof(AnnouncementCommentDto.User))] + private partial AnnouncementCommentDto? MapComment(AnnouncementComment? source); + public override void BeforeMap(Announcement source) { } @@ -23,8 +30,10 @@ public partial class AnnouncementToAnnouncementDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(SurveyDto.MyResponse))] public override partial SurveyDto Map(Survey source); + [MapperIgnoreTarget(nameof(SurveyDto.MyResponse))] public override partial void Map(Survey source, SurveyDto destination); public override void BeforeMap(Survey source) @@ -103,10 +112,18 @@ public partial class SurveyAnswerToSurveyAnswerDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(SocialPostDto.User))] public override partial SocialPostDto Map(SocialPost source); + [MapperIgnoreTarget(nameof(SocialPostDto.User))] public override partial void Map(SocialPost source, SocialPostDto destination); + [MapperIgnoreTarget(nameof(SocialCommentDto.User))] + private partial SocialCommentDto? MapComment(SocialComment? source); + + [MapperIgnoreTarget(nameof(SocialLikeDto.User))] + private partial SocialLikeDto? MapLike(SocialLike? source); + public override void BeforeMap(SocialPost source) { } @@ -151,8 +168,10 @@ public partial class SocialPollOptionToSocialPollOptionDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(SocialCommentDto.User))] public override partial SocialCommentDto Map(SocialComment source); + [MapperIgnoreTarget(nameof(SocialCommentDto.User))] public override partial void Map(SocialComment source, SocialCommentDto destination); public override void BeforeMap(SocialComment source) @@ -167,8 +186,10 @@ public partial class SocialCommentToSocialCommentDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(SocialLikeDto.User))] public override partial SocialLikeDto Map(SocialLike source); + [MapperIgnoreTarget(nameof(SocialLikeDto.User))] public override partial void Map(SocialLike source, SocialLikeDto destination); public override void BeforeMap(SocialLike source) diff --git a/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs index d4d7ebb3..ac9e0755 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs @@ -320,7 +320,7 @@ public class ListFormJsonRowAppService : PlatformAppService { var listData = json.IsNullOrWhiteSpace() ? [] : - JsonSerializer.Deserialize>(json); + JsonSerializer.Deserialize>(json) ?? []; listData.Add(input); return JsonSerializer.Serialize(listData); @@ -328,14 +328,14 @@ public class ListFormJsonRowAppService : PlatformAppService private string UpdateRow(string json, T input, int index) { - var listData = JsonSerializer.Deserialize>(json); + var listData = JsonSerializer.Deserialize>(json) ?? []; listData[index] = input; return JsonSerializer.Serialize(listData); } private string DeleteRow(string json, int index) { - var listData = JsonSerializer.Deserialize>(json); + var listData = JsonSerializer.Deserialize>(json) ?? []; listData.RemoveAt(index); return JsonSerializer.Serialize(listData); } diff --git a/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormsAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormsAppService.cs index 11ddbe5a..bf1d0347 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormsAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/Administration/ListFormsAppService.cs @@ -9,6 +9,7 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; using Volo.Abp.Domain.Repositories; using static Sozsoft.Platform.PlatformConsts; +using Volo.Abp.Domain.Entities; namespace Sozsoft.Platform.ListForms.Administration; @@ -44,7 +45,8 @@ public class ListFormsAppService : CrudAppService< throw new UserFriendlyException(L[AppErrorCodes.NoAuth]); } - var r = await Repository.FirstOrDefaultAsync(c => c.ListFormCode == listFormCode); + var r = await Repository.FirstOrDefaultAsync(c => c.ListFormCode == listFormCode) + ?? throw new EntityNotFoundException(typeof(ListForm), listFormCode); var model = ObjectMapper.Map(r); return model; } diff --git a/api/src/Sozsoft.Platform.Application/ListForms/ListFormCustomizationAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/ListFormCustomizationAppService.cs index 6fd9dfbd..cbcf3b61 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/ListFormCustomizationAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/ListFormCustomizationAppService.cs @@ -38,7 +38,7 @@ public class ListFormCustomizationAppService : PlatformAppService } } - public async Task> GetListAsync(string listFormCode, ListFormCustomizationTypeEnum type, string filterName = null) + public async Task> GetListAsync(string listFormCode, ListFormCustomizationTypeEnum type, string? filterName = null) { await CheckAccessAsync(listFormCode); if (!(type == ListFormCustomizationTypeEnum.GridState || type == ListFormCustomizationTypeEnum.UserUiFilter)) diff --git a/api/src/Sozsoft.Platform.Application/ListForms/ListFormDynamicApiAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/ListFormDynamicApiAppService.cs index f59b11cc..b7f72ab3 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/ListFormDynamicApiAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/ListFormDynamicApiAppService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -472,7 +472,7 @@ public class ListFormDynamicApiAppService : PlatformAppService, IListFormDynamic /// Atlananlarin kanal bazli gerekcesi. Adresi olmayan alici gonderimi durdurmaz; gonderen /// kimin alamadigini kayitta gorur, cozum kullanici kaydindadir. /// - private string BuildSkippedNote(ManualNotificationResult result) + private string? BuildSkippedNote(ManualNotificationResult result) { return result.SkippedCount == 0 ? null diff --git a/api/src/Sozsoft.Platform.Application/ListForms/ListFormMappers.cs b/api/src/Sozsoft.Platform.Application/ListForms/ListFormMappers.cs index 0a93c1aa..72b72ce3 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/ListFormMappers.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/ListFormMappers.cs @@ -10,8 +10,46 @@ namespace Sozsoft.Platform.ListForms; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class ListFormFieldToColumnFormatDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnCustomizationDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnFilterDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnGroupSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnGroupingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnHeaderDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnStylingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnTotalSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.CreationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.CreatorId))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.DefaultValue))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.DefaultValueType))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.IsLookupSelfSourced))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.LastModifierId))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.LookupDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.PermissionDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.PivotSettingsDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ReadOnly))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ValidationRuleDto))] public override partial ColumnFormatDto Map(ListFormField source); + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnCustomizationDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnFilterDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnGroupSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnGroupingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnHeaderDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnStylingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ColumnTotalSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.CreationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.CreatorId))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.DefaultValue))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.DefaultValueType))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.IsLookupSelfSourced))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.LastModifierId))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.LookupDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.PermissionDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.PivotSettingsDto))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ReadOnly))] + [MapperIgnoreTarget(nameof(ColumnFormatDto.ValidationRuleDto))] public override partial void Map(ListFormField source, ColumnFormatDto destination); public override void BeforeMap(ListFormField source) @@ -26,8 +64,50 @@ public partial class ListFormFieldToColumnFormatDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnCustomizationDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnFilterDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnGroupSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnGroupingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnHeaderDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnJoinTableDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnStylingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnTotalSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.CreationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.CreatorId))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.DefaultValue))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.DefaultValueType))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.EditType))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.IsLookupSelfSourced))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.LastModifierId))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.LookupDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.PermissionDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.PivotSettingsDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ReadOnly))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ValidationRuleDto))] public override partial ColumnFormatEditDto Map(ListFormField source); + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnCustomizationDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnFilterDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnGroupSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnGroupingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnHeaderDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnJoinTableDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnStylingDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ColumnTotalSummaryDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.CreationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.CreatorId))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.DefaultValue))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.DefaultValueType))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.EditType))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.IsLookupSelfSourced))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.LastModifierId))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.LookupDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.PermissionDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.PivotSettingsDto))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ReadOnly))] + [MapperIgnoreTarget(nameof(ColumnFormatEditDto.ValidationRuleDto))] public override partial void Map(ListFormField source, ColumnFormatEditDto destination); public override void BeforeMap(ListFormField source) @@ -70,8 +150,32 @@ public partial class ListFormFieldToAddListFormFieldDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(ListFormsDto.CreationTime))] + [MapperIgnoreTarget(nameof(ListFormsDto.CreatorId))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsExportable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsFilterable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsGroupable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsPrintable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsSelectable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsSortable))] + [MapperIgnoreTarget(nameof(ListFormsDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(ListFormsDto.LastModifierId))] + [MapperIgnoreTarget(nameof(ListFormsDto.PagingType))] + [MapperIgnoreTarget(nameof(ListFormsDto.RowsPerPage))] public override partial ListFormsDto Map(ListForm source); + [MapperIgnoreTarget(nameof(ListFormsDto.CreationTime))] + [MapperIgnoreTarget(nameof(ListFormsDto.CreatorId))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsExportable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsFilterable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsGroupable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsPrintable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsSelectable))] + [MapperIgnoreTarget(nameof(ListFormsDto.IsSortable))] + [MapperIgnoreTarget(nameof(ListFormsDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(ListFormsDto.LastModifierId))] + [MapperIgnoreTarget(nameof(ListFormsDto.PagingType))] + [MapperIgnoreTarget(nameof(ListFormsDto.RowsPerPage))] public override partial void Map(ListForm source, ListFormsDto destination); public override void BeforeMap(ListForm source) @@ -86,8 +190,108 @@ public partial class ListFormToListFormsDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(GridOptionsDto.AdaptivelayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.AnimationDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.AnnotationsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ArgumentAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ColumnOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommandColumnDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonAnnotationSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonAxisSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonPaneSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonSeriesSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CreationTime))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CreatorId))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CrosshairDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CustomJsSources))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CustomStyleSources))] + [MapperIgnoreTarget(nameof(GridOptionsDto.EditingFormDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.EditingOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ExportDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ExtraFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.FilterPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.FilterRowDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.GanttOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.GroupPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.HeaderFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LastModifierId))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LegendDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.MarginDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PagerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PanesDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PermissionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PivotOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.RowDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SchedulerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ScrollBarDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SearchPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SelectionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SeriesDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SizeDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.StateStoringDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SubFormsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TitleDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TodoOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TooltipDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TreeOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ValueAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.WorkflowDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ZoomAndPanDto))] public override partial GridOptionsDto Map(ListForm source); + [MapperIgnoreTarget(nameof(GridOptionsDto.AdaptivelayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.AnimationDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.AnnotationsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ArgumentAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ColumnOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommandColumnDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonAnnotationSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonAxisSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonPaneSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CommonSeriesSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CreationTime))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CreatorId))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CrosshairDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CustomJsSources))] + [MapperIgnoreTarget(nameof(GridOptionsDto.CustomStyleSources))] + [MapperIgnoreTarget(nameof(GridOptionsDto.EditingFormDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.EditingOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ExportDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ExtraFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.FilterPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.FilterRowDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.GanttOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.GroupPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.HeaderFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LastModifierId))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.LegendDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.MarginDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PagerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PanesDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PermissionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.PivotOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.RowDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SchedulerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ScrollBarDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SearchPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SelectionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SeriesDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SizeDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.StateStoringDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.SubFormsDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TitleDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TodoOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TooltipDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.TreeOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ValueAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.WorkflowDto))] + [MapperIgnoreTarget(nameof(GridOptionsDto.ZoomAndPanDto))] public override partial void Map(ListForm source, GridOptionsDto destination); public override void BeforeMap(ListForm source) @@ -102,8 +306,124 @@ public partial class ListFormToGridOptionsDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(GridOptionsEditDto.AdaptivelayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.AnimationDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.AnnotationsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ArgumentAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ColumnOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommandColumnDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonAnnotationSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonAxisSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonPaneSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonSeriesSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CreationTime))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CreatorId))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CrosshairDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CustomJsSources))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CustomStyleSources))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.DeleteFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.EditType))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.EditingFormDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.EditingOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ExportDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ExtraFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ExtraFilterEditDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.FilterPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.FilterRowDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.FormFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.GanttOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.GroupPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.HeaderFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.InsertFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LastModifierId))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LegendDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.MarginDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PagerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PanesDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PermissionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PivotOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.RowDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SchedulerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ScrollBarDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SearchPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SelectFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SelectionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SeriesDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SizeDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.StateStoringDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SubFormsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TitleDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TodoOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TooltipDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TreeOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.UpdateFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ValueAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.WidgetsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.WorkflowDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ZoomAndPanDto))] public override partial GridOptionsEditDto Map(ListForm source); + [MapperIgnoreTarget(nameof(GridOptionsEditDto.AdaptivelayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.AnimationDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.AnnotationsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ArgumentAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ColumnOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommandColumnDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonAnnotationSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonAxisSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonPaneSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CommonSeriesSettingsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CreationTime))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CreatorId))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CrosshairDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CustomJsSources))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.CustomStyleSources))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.DeleteFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.EditType))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.EditingFormDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.EditingOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ExportDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ExtraFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ExtraFilterEditDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.FilterPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.FilterRowDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.FormFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.GanttOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.GroupPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.HeaderFilterDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.InsertFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LastModifierId))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LayoutDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.LegendDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.MarginDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PagerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PanesDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PermissionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.PivotOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.RowDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SchedulerOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ScrollBarDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SearchPanelDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SelectFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SelectionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SeriesDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SizeDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.StateStoringDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.SubFormsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TitleDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TodoOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TooltipDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.TreeOptionDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.UpdateFieldsDefaultValueDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ValueAxisDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.WidgetsDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.WorkflowDto))] + [MapperIgnoreTarget(nameof(GridOptionsEditDto.ZoomAndPanDto))] public override partial void Map(ListForm source, GridOptionsEditDto destination); public override void BeforeMap(ListForm source) @@ -146,8 +466,14 @@ public partial class ListFormCustomizationToListFormCustomizationDtoMapper : Two { } + [MapperIgnoreTarget(nameof(ListFormCustomization.DeleterId))] + [MapperIgnoreTarget(nameof(ListFormCustomization.DeletionTime))] + [MapperIgnoreTarget(nameof(ListFormCustomization.IsDeleted))] public override partial ListFormCustomization ReverseMap(ListFormCustomizationDto destination); + [MapperIgnoreTarget(nameof(ListFormCustomization.DeleterId))] + [MapperIgnoreTarget(nameof(ListFormCustomization.DeletionTime))] + [MapperIgnoreTarget(nameof(ListFormCustomization.IsDeleted))] public override partial void ReverseMap(ListFormCustomizationDto destination, ListFormCustomization source); public override void BeforeReverseMap(ListFormCustomizationDto destination) @@ -318,8 +644,10 @@ public partial class WidgetEditDtoToWidgetMapper : TwoWayMapperBase { + [MapperIgnoreTarget(nameof(ExtraFilter.SqlQuery))] public override partial ExtraFilter Map(ExtraFilterDto source); + [MapperIgnoreTarget(nameof(ExtraFilter.SqlQuery))] public override partial void Map(ExtraFilterDto source, ExtraFilter destination); public override void BeforeMap(ExtraFilterDto source) @@ -330,8 +658,10 @@ public partial class ExtraFilterDtoToExtraFilterMapper : TwoWayMapperBase -{ - public override partial ChartSeries Map(ChartSeriesDto source); - - public override partial void Map(ChartSeriesDto source, ChartSeries destination); - - public override void BeforeMap(ChartSeriesDto source) - { - } - - public override void AfterMap(ChartSeriesDto source, ChartSeries destination) - { - } - - public override partial ChartSeriesDto ReverseMap(ChartSeries destination); - - public override partial void ReverseMap(ChartSeries destination, ChartSeriesDto source); - - public override void BeforeReverseMap(ChartSeries destination) - { - } - - public override void AfterReverseMap(ChartSeries destination, ChartSeriesDto source) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class ChartLabelDtoToChartLabelMapper : MapperBase -{ - public override partial ChartLabel Map(ChartLabelDto source); - - public override partial void Map(ChartLabelDto source, ChartLabel destination); - - public override void BeforeMap(ChartLabelDto source) - { - } - - public override void AfterMap(ChartLabelDto source, ChartLabel destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class ChartValueAxisDtoToChartValueAxisMapper : MapperBase -{ - public override partial ChartValueAxis Map(ChartValueAxisDto source); - - public override partial void Map(ChartValueAxisDto source, ChartValueAxis destination); - - public override void BeforeMap(ChartValueAxisDto source) - { - } - - public override void AfterMap(ChartValueAxisDto source, ChartValueAxis destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class ChartAxisGridDtoToChartAxisGridMapper : MapperBase -{ - public override partial ChartAxisGrid Map(ChartAxisGridDto source); - - public override partial void Map(ChartAxisGridDto source, ChartAxisGrid destination); - - public override void BeforeMap(ChartAxisGridDto source) - { - } - - public override void AfterMap(ChartAxisGridDto source, ChartAxisGrid destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class BreakStyleDtoToBreakStyleMapper : MapperBase -{ - public override partial BreakStyle Map(BreakStyleDto source); - - public override partial void Map(BreakStyleDto source, BreakStyle destination); - - public override void BeforeMap(BreakStyleDto source) - { - } - - public override void AfterMap(BreakStyleDto source, BreakStyle destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class BreakDtoToBreakMapper : MapperBase -{ - public override partial Break Map(BreakDto source); - - public override partial void Map(BreakDto source, Break destination); - - public override void BeforeMap(BreakDto source) - { - } - - public override void AfterMap(BreakDto source, Break destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class ChartPanesDtoToChartPanesMapper : MapperBase -{ - public override partial ChartPanes Map(ChartPanesDto source); - - public override partial void Map(ChartPanesDto source, ChartPanes destination); - - public override void BeforeMap(ChartPanesDto source) - { - } - - public override void AfterMap(ChartPanesDto source, ChartPanes destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class ChartAnnotationDtoToChartAnnotationMapper : MapperBase -{ - public override partial ChartAnnotation Map(ChartAnnotationDto source); - - public override partial void Map(ChartAnnotationDto source, ChartAnnotation destination); - - public override void BeforeMap(ChartAnnotationDto source) - { - } - - public override void AfterMap(ChartAnnotationDto source, ChartAnnotation destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class ChartBorderDtoToChartBorderMapper : MapperBase -{ - public override partial ChartBorder Map(ChartBorderDto source); - - public override partial void Map(ChartBorderDto source, ChartBorder destination); - - public override void BeforeMap(ChartBorderDto source) - { - } - - public override void AfterMap(ChartBorderDto source, ChartBorder destination) - { - } -} - -[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] -public partial class ChartFontDtoToChartFontMapper : MapperBase -{ - public override partial ChartFont Map(ChartFontDto source); - - public override partial void Map(ChartFontDto source, ChartFont destination); - - public override void BeforeMap(ChartFontDto source) - { - } - - public override void AfterMap(ChartFontDto source, ChartFont destination) - { - } -} - [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class ListFormImportToListFormsImportDtoMapper : MapperBase { diff --git a/api/src/Sozsoft.Platform.Application/ListForms/ListFormSeedDataSynchronizer.cs b/api/src/Sozsoft.Platform.Application/ListForms/ListFormSeedDataSynchronizer.cs index 5ff6d26e..aff71374 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/ListFormSeedDataSynchronizer.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/ListFormSeedDataSynchronizer.cs @@ -27,13 +27,13 @@ public interface IListFormSeedDataSynchronizer /// Ekranin ilgili senkronizasyon bayragi kapaliysa hicbir sey yapmaz. Anahtar bilinmiyorsa /// ya da satir okunamiyorsa dosya listenin tamamiyla yenilenir. /// - Task SyncRowAsync(string listFormCode, object key, SeedSyncOperation operation); + Task SyncRowAsync(string listFormCode, object? key, SeedSyncOperation operation); /// /// 'in toplu hali: tek dosya modunda dosya bir kez okunup bir kez yazilir. /// Siralama gibi bircok satiri birlikte degistiren islemler icindir. /// - Task SyncRowsAsync(string listFormCode, IReadOnlyCollection keys, SeedSyncOperation operation); + Task SyncRowsAsync(string listFormCode, IReadOnlyCollection keys, SeedSyncOperation operation); /// Silinen satirlari dosyadan cikarir; SeedSyncDelete kapaliysa hicbir sey yapmaz. Task RemoveRowsAsync(string listFormCode, object[] keys); @@ -88,10 +88,10 @@ public class ListFormSeedDataSynchronizer( /// private sealed record SeedTarget(string Path, bool IsFolder); - public Task SyncRowAsync(string listFormCode, object key, SeedSyncOperation operation) => + public Task SyncRowAsync(string listFormCode, object? key, SeedSyncOperation operation) => SyncRowsAsync(listFormCode, [key], operation); - public async Task SyncRowsAsync(string listFormCode, IReadOnlyCollection keys, SeedSyncOperation operation) + public async Task SyncRowsAsync(string listFormCode, IReadOnlyCollection keys, SeedSyncOperation operation) { await ExecuteAsync(listFormCode, IsEnabled(operation), async (listForm, target) => { @@ -100,8 +100,7 @@ public class ListFormSeedDataSynchronizer( var rows = new List<(object Key, Dictionary Row)>(); foreach (var key in keys ?? []) { - var row = key == null ? null : await ReadRowAsync(listForm, key); - if (row == null) + if (key == null || await ReadRowAsync(listForm, key) is not { } row) { logger.LogInformation("Row '{Key}' could not be read for '{ListFormCode}', seed file is rewritten from the list.", key, listForm.ListFormCode); await WriteAllRowsAsync(listForm, target); @@ -273,7 +272,7 @@ public class ListFormSeedDataSynchronizer( RequireGroupCount = false, }); - List> page = ToRows((object)result?.Data); + List> page = ToRows((object?)result?.Data); rows.AddRange(page); if (page.Count < SyncAllPageSize) @@ -429,7 +428,7 @@ public class ListFormSeedDataSynchronizer( } } - private async Task> ReadRowAsync(ListForm listForm, object key) + private async Task?> ReadRowAsync(ListForm listForm, object key) { object[] filter = [listForm.KeyFieldName, "=", key]; @@ -445,13 +444,13 @@ public class ListFormSeedDataSynchronizer( // Data dinamik oldugu icin once statik tipe alinir; aksi halde LINQ eklentileri // calisma zamaninda cozulemez. - List> rows = ToRows((object)result?.Data); + List> rows = ToRows((object?)result?.Data); return rows.FirstOrDefault(); } /// Select sonucundaki dinamik satirlari dosyaya yazilabilir sozluklere cevirir. - private static List> ToRows(object data) + private static List> ToRows(object? data) { var rows = new List>(); @@ -477,7 +476,7 @@ public class ListFormSeedDataSynchronizer( } /// Anahtarlar dosyada JsonElement, istekte string/Guid olarak gelir; metin uzerinden karsilastirilir. - private static string ToComparableText(object value) + private static string ToComparableText(object? value) { return value switch { diff --git a/api/src/Sozsoft.Platform.Application/ListForms/ListFormSelectAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/ListFormSelectAppService.cs index 724a043c..7022d6ba 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/ListFormSelectAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/ListFormSelectAppService.cs @@ -34,7 +34,7 @@ public class ListFormSelectAppService : PlatformAppService, IListFormSelectAppSe private readonly IDataSourceManager dataSourceManager; private readonly IDynamicDataManager dynamicDataManager; private readonly DefaultValueHelper defaultValueHelper; - private readonly string userId; + private readonly string? userId; private readonly string[] roleIds; private readonly string cultureName; @@ -110,8 +110,8 @@ public class ListFormSelectAppService : PlatformAppService, IListFormSelectAppSe { IDictionary itemObj = item; var k = itemObj[$"Group_{level}_Key"]; - // var grouping = (IGrouping)group.Item3.FirstOrDefault(a => a.Key == k); - var grouping = (IGrouping)group.Item3.FirstOrDefault(a => a.GetType().GetProperty("Key").GetValue(a, null) == k); + // var grouping = (IGrouping?)group.Item3.FirstOrDefault(a => a.Key == k); + var grouping = (IGrouping?)group.Item3.FirstOrDefault(a => a.GetType().GetProperty("Key").GetValue(a, null) == k); if (grouping == null) { continue; @@ -341,7 +341,9 @@ public class ListFormSelectAppService : PlatformAppService, IListFormSelectAppSe workflowDto.Criteria = await GetWorkflowCriteriaAsync(ListFormCode); result.GridOptions.WorkflowDto = workflowDto; - var queryParameters = httpContextAccessor.HttpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); + var httpContext = httpContextAccessor.HttpContext + ?? throw new InvalidOperationException("HTTP Context bulunamadı."); + var queryParameters = httpContext.Request.Query.ToDictionary(x => x.Key, x => x.Value); var defaultFields = await defaultValueManager.GenerateDefaultValuesAsync(listForm, fields, Enums.OperationEnum.Select, queryParameters: queryParameters); // Performans: Dictionary ile hızlı lookup diff --git a/api/src/Sozsoft.Platform.Application/ListForms/ListFormWizardAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/ListFormWizardAppService.cs index eb2ffe89..1c241d23 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/ListFormWizardAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/ListFormWizardAppService.cs @@ -832,7 +832,7 @@ public class ListFormWizardAppService( var groups = await repoPermGroup.GetListAsync(); var names = groups.Where(g => g.Name != null).Select(g => g.Name!).ToList(); - var texts = await repoLangText.GetListAsync(a => a.ResourceName == res && names.Contains(a.Key)); + var texts = await repoLangText.GetListAsync(a => a.ResourceName == res && a.Key != null && names.Contains(a.Key)); var textsByKey = texts.Where(t => t.Key != null).GroupBy(t => t.Key!).ToDictionary(g => g.Key, g => g.ToList()); return [.. groups diff --git a/api/src/Sozsoft.Platform.Application/ListForms/ListFormWorkflowAppService.cs b/api/src/Sozsoft.Platform.Application/ListForms/ListFormWorkflowAppService.cs index e39e4c51..305d2b2f 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/ListFormWorkflowAppService.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/ListFormWorkflowAppService.cs @@ -66,7 +66,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA } [HttpGet("criteria")] - public async Task GetCriteriaAsync(string listFormCode = null) + public async Task GetCriteriaAsync(string? listFormCode = null) { var code = listFormCode; var criteria = (await criteriaRepository.GetListAsync(x => x.ListFormCode == code)) @@ -247,7 +247,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA } [HttpPost("reset-demo")] - public async Task ResetDemoAsync(string listFormCode = null) + public async Task ResetDemoAsync(string? listFormCode = null) { var code = listFormCode; var existing = await criteriaRepository.GetListAsync(x => x.ListFormCode == code); @@ -302,7 +302,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return await StartSingleAsync(input.ListFormCode, input.Keys); } - private async Task StartSingleAsync(string listFormCode, object[] keys) + private async Task StartSingleAsync(string listFormCode, object[]? keys) { var context = await CreateRunContextAsync(listFormCode, keys); var start = context.Criteria.FirstOrDefault(x => x.Kind == "Start") @@ -329,7 +329,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return await ResetSingleAsync(input.ListFormCode, input.Keys); } - private async Task ResetSingleAsync(string listFormCode, object[] keys) + private async Task ResetSingleAsync(string listFormCode, object[]? keys) { var context = await CreateRunContextAsync(listFormCode, keys); if (!context.Workflow.ApprovalIsResetWorkflow) @@ -342,7 +342,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA var previousStatus = GetRowValue(context.Row, context.Workflow.ApprovalStatusFieldName)?.ToString(); - var clear = new Dictionary + var clear = new Dictionary { [context.Workflow.ApprovalStatusFieldName] = null }; @@ -388,7 +388,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return await DecisionSingleAsync(input, input.Keys); } - private async Task DecisionSingleAsync(DecisionWorkflowDto input, object[] keys) + private async Task DecisionSingleAsync(DecisionWorkflowDto input, object[]? keys) { var context = await CreateRunContextAsync(input.ListFormCode, keys); var currentNodeId = GetRowValue(context.Row, context.Workflow.ApprovalStatusFieldName)?.ToString(); @@ -421,7 +421,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA throw new UserFriendlyException("Bu kayıt için onay yetkiniz yok."); } - var update = new Dictionary(); + var update = new Dictionary(); if (!context.Workflow.ApprovalUserFieldName.IsNullOrWhiteSpace()) { update[context.Workflow.ApprovalUserFieldName] = CurrentUser.UserName ?? CurrentUser.Name ?? string.Empty; @@ -483,7 +483,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA }; } - private async Task CreateRunContextAsync(string listFormCode, object[] keys) + private async Task CreateRunContextAsync(string listFormCode, object[]? keys) { var code = listFormCode; if (!await authManager.CanAccess(code, AuthorizationTypeEnum.Update)) @@ -514,7 +514,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return new WorkflowRunContext(code, keys, workflow, criteria, row); } - private async Task> GetRowAsync(string listFormCode, string keyFieldName, object key) + private async Task> GetRowAsync(string listFormCode, string keyFieldName, object key) { var filter = JsonSerializer.Serialize(new object[] { keyFieldName, "=", key }); var result = await listFormSelectAppService.GetSelectAsync(new SelectRequestDto @@ -530,7 +530,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA var row = ((result?.Data as System.Collections.IEnumerable)?.Cast()?.FirstOrDefault()) ?? throw new UserFriendlyException("Workflow kaydı bulunamadı."); - if (row is IDictionary dictionary) + if (row is IDictionary dictionary) { return dictionary; } @@ -538,7 +538,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA throw new UserFriendlyException("Workflow kaydı okunamadı."); } - private async Task RunUntilWaitAsync(WorkflowRunContext context, ListFormWorkflow current) + private async Task RunUntilWaitAsync(WorkflowRunContext context, ListFormWorkflow? current) { var visited = new HashSet(); @@ -569,7 +569,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA private async Task ApplyNodeAsync(WorkflowRunContext context, ListFormWorkflow node) { - var update = new Dictionary + var update = new Dictionary { [context.Workflow.ApprovalStatusFieldName] = node.Title }; @@ -620,7 +620,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA KeyValuePair? sender = null; if (!senderEmail.IsNullOrWhiteSpace()) { - sender = new KeyValuePair(senderName, senderEmail); + sender = new KeyValuePair(senderName ?? string.Empty, senderEmail); } var body = BuildInformEmailBody(context, node, await BuildPreviousWorkflowNotesHtmlAsync(context)); @@ -707,6 +707,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA private IEnumerable GetCurrentUserWorkflowIdentities() { return new[] { CurrentUser.UserName, CurrentUser.Email, CurrentUser.Name } + .OfType() .Where(identity => !identity.IsNullOrWhiteSpace()) .Select(identity => identity.Trim()); } @@ -866,7 +867,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA } } - private ListFormWorkflow FindNextToastNode( + private ListFormWorkflow? FindNextToastNode( WorkflowRunContext context, ListFormWorkflow node) { @@ -886,7 +887,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return null; } - private IEnumerable FormatNextToastNode(ListFormWorkflow node) + private IEnumerable FormatNextToastNode(ListFormWorkflow? node) { if (node == null) { @@ -1035,7 +1036,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return WebUtility.HtmlEncode(value ?? string.Empty); } - private async Task UpdateRowAsync(WorkflowRunContext context, Dictionary data) + private async Task UpdateRowAsync(WorkflowRunContext context, Dictionary data) { await queryManager.GenerateAndRunQueryAsync( context.ListFormCode, @@ -1044,7 +1045,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA context.Keys); } - private string ResolveNextNodeId(WorkflowRunContext context, ListFormWorkflow current) + private string? ResolveNextNodeId(WorkflowRunContext context, ListFormWorkflow current) { if (current.Kind == "Start" || current.Kind == "Inform") { @@ -1078,9 +1079,9 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA } private static bool EvaluateCondition( - IDictionary row, + IDictionary row, WorkflowConditionDto condition, - string fallbackCompareColumn = null) + string? fallbackCompareColumn = null) { if (condition == null || condition.CompareColumn.IsNullOrWhiteSpace()) { @@ -1115,9 +1116,9 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA } private static string ResolveCompareColumn( - IDictionary row, + IDictionary row, string compareColumn, - string fallbackCompareColumn) + string? fallbackCompareColumn) { if (TryGetRowValue(row, compareColumn, out _)) { @@ -1146,12 +1147,12 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA $"Workflow karşılaştırma alanı bulunamadı: {compareColumn}. Mevcut alanlar: {string.Join(", ", row.Keys)}"); } - private static object GetRowValue(IDictionary row, string fieldName) + private static object? GetRowValue(IDictionary row, string? fieldName) { return TryGetRowValue(row, fieldName, out var value) ? value : null; } - private static bool IsRowValueEmpty(IDictionary row, string fieldName) + private static bool IsRowValueEmpty(IDictionary row, string fieldName) { if (!TryGetRowValue(row, fieldName, out var value)) { @@ -1161,8 +1162,14 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return value == null || value == DBNull.Value || value.ToString().IsNullOrWhiteSpace(); } - private static bool TryGetRowValue(IDictionary row, string fieldName, out object value) + private static bool TryGetRowValue(IDictionary row, string? fieldName, out object? value) { + if (fieldName == null) + { + value = null; + return false; + } + if (row.TryGetValue(fieldName, out value)) { return true; @@ -1179,7 +1186,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return true; } - private static void MergeRowValues(IDictionary row, Dictionary values) + private static void MergeRowValues(IDictionary row, Dictionary values) { foreach (var value in values) { @@ -1187,12 +1194,12 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA } } - private static ListFormWorkflow FindNextCriteria(List criteria, string id) + private static ListFormWorkflow? FindNextCriteria(List criteria, string? id) { return id.IsNullOrWhiteSpace() ? null : criteria.FirstOrDefault(x => x.Id == id); } - private static ListFormWorkflow FindCurrentCriteria(List criteria, string currentNodeId) + private static ListFormWorkflow? FindCurrentCriteria(List criteria, string? currentNodeId) { if (currentNodeId.IsNullOrWhiteSpace()) { @@ -1205,7 +1212,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA private static WorkflowRunResultDto ToRunResult( WorkflowRunContext context, - ListFormWorkflow node, + ListFormWorkflow? node, bool waitingApproval, bool completed) { @@ -1222,7 +1229,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA } private async Task CreateCriteriaAsync( - string listFormCode, + string? listFormCode, string kind, string title, int positionX, @@ -1252,7 +1259,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return criteria; } - private async Task GenerateNextCriteriaIdAsync(string listFormCode) + private async Task GenerateNextCriteriaIdAsync(string? listFormCode) { var criteria = await criteriaRepository.GetListAsync(x => x.ListFormCode == listFormCode); var maxNumber = criteria @@ -1273,7 +1280,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return nextId; } - private static int TryParseCriteriaIdNumber(string listFormCode, string id) + private static int TryParseCriteriaIdNumber(string? listFormCode, string id) { var localId = GetLocalCriteriaId(listFormCode, id); if (localId.IsNullOrWhiteSpace() || @@ -1285,7 +1292,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA return int.TryParse(localId[CriteriaIdPrefix.Length..], out var number) ? number : 0; } - private static string FormatCriteriaId(string listFormCode, int number) + private static string FormatCriteriaId(string? listFormCode, int number) { return $"{listFormCode}-{CriteriaIdPrefix}{number.ToString().PadLeft(CriteriaIdPadding, '0')}"; } @@ -1329,7 +1336,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA : trimmed; } - private static string GetLocalCriteriaId(string listFormCode, string id) + private static string GetLocalCriteriaId(string? listFormCode, string id) { var normalized = id?.Trim(); if (normalized.IsNullOrWhiteSpace()) @@ -1490,7 +1497,7 @@ public class ListFormWorkflowAppService : PlatformAppService, IListFormWorkflowA object[] Keys, WorkflowDto Workflow, List Criteria, - IDictionary Row) + IDictionary Row) { public HashSet UserUpdatedFields { get; } = []; public List<(string Label, string Value)> WorkflowNoteRows { get; } = []; diff --git a/api/src/Sozsoft.Platform.Application/ListForms/WizardSeedSynchronizer.cs b/api/src/Sozsoft.Platform.Application/ListForms/WizardSeedSynchronizer.cs index 16ea56c9..612f5908 100644 --- a/api/src/Sozsoft.Platform.Application/ListForms/WizardSeedSynchronizer.cs +++ b/api/src/Sozsoft.Platform.Application/ListForms/WizardSeedSynchronizer.cs @@ -48,8 +48,7 @@ public class WizardSeedSynchronizer( try { - var (filePath, seed) = await FindSeedFileAsync(listFormCode); - if (seed == null) + if (await FindSeedFileAsync(listFormCode) is not (var filePath, var seed)) return; // Bekleyen kurulumu olan dosya ekranin bir sonraki surumunu tasir; veritabanindaki (eski) @@ -90,11 +89,11 @@ public class WizardSeedSynchronizer( /// wizard adiyla ayni oldugu icin once dogrudan ad denenir; eski ya da elle adlandirilmis /// dosyalar icin klasor taranir. /// - private async Task<(string FilePath, WizardSeedFileDto Seed)> FindSeedFileAsync(string listFormCode) + private async Task<(string FilePath, WizardSeedFileDto Seed)?> FindSeedFileAsync(string listFormCode) { var wizardPath = SeedPathResolver.GetScopePath(configuration, currentTenant.Id, SeedPathResolver.WizardFolder); if (!Directory.Exists(wizardPath)) - return (null, null); + return null; var candidates = new List(); var directPath = Path.Combine(wizardPath, $"{listFormCode}.json"); @@ -115,10 +114,10 @@ public class WizardSeedSynchronizer( } } - return (null, null); + return null; } - private async Task ReadSeedAsync(string filePath) + private async Task ReadSeedAsync(string filePath) { try { diff --git a/api/src/Sozsoft.Platform.Application/Menu/MenuAppService.cs b/api/src/Sozsoft.Platform.Application/Menu/MenuAppService.cs index de0d12ee..0420b1f1 100644 --- a/api/src/Sozsoft.Platform.Application/Menu/MenuAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Menu/MenuAppService.cs @@ -69,9 +69,9 @@ public class MenuAppService : CrudAppService< query = query.Where(a => !a.IsDisabled); //Tenant üzerinden modül bilgisi alınıp yalnızca o modüllerin menüleri listelenecek - if (CurrentTenant.IsAvailable) + if (CurrentTenant.Id is Guid tenantId) { - var tenant = await _tenantRepository.FindAsync(CurrentTenant.Id.Value); + var tenant = await _tenantRepository.FindAsync(tenantId); if (tenant != null) { var tenantModules = tenant.GetModules(); @@ -138,12 +138,13 @@ public class MenuAppService : CrudAppService< var languageKeys = entityDtos .Select(item => string.IsNullOrWhiteSpace(item.DisplayName) ? item.Code : item.DisplayName) + .OfType() .Where(key => !string.IsNullOrWhiteSpace(key)) .Distinct() .ToList(); var languageTexts = await _repositoryText.GetListAsync(text => text.ResourceName == PlatformConsts.AppName && - languageKeys.Contains(text.Key) && + text.Key != null && languageKeys.Contains(text.Key) && (text.CultureName == PlatformConsts.DefaultLanguage || text.CultureName == LanguageCodes.Tr)); @@ -410,13 +411,16 @@ public class MenuAppService : CrudAppService< /// Kodu degisen menunun eski satiri dosyadan cikarilir; dosya Code anahtarli oldugu icin /// yeni kod ayri bir satir olarak eklenir. /// - private async Task SyncUpdatedMenuRowsAsync(IEnumerable<(string PreviousCode, string Code)> changes) + private async Task SyncUpdatedMenuRowsAsync(IEnumerable<(string? PreviousCode, string Code)> changes) { var list = changes.ToList(); var renamed = list - .Where(x => !string.IsNullOrWhiteSpace(x.PreviousCode) && x.PreviousCode != x.Code) - .Select(x => (object)x.PreviousCode) + .Where(x => x.PreviousCode != x.Code) + .Select(x => x.PreviousCode) + .OfType() + .Where(code => !string.IsNullOrWhiteSpace(code)) + .Cast() .ToArray(); if (renamed.Length > 0) await _seedDataSynchronizer.RemoveRowsAsync(AppCodes.Menus.Menu, renamed); diff --git a/api/src/Sozsoft.Platform.Application/Menu/MenuMappers.cs b/api/src/Sozsoft.Platform.Application/Menu/MenuMappers.cs index ca057c43..c4100456 100644 --- a/api/src/Sozsoft.Platform.Application/Menu/MenuMappers.cs +++ b/api/src/Sozsoft.Platform.Application/Menu/MenuMappers.cs @@ -7,8 +7,26 @@ namespace Sozsoft.Platform.Menus; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class MenuToMenuDtoMapper : TwoWayMapperBase { + [MapperIgnoreTarget(nameof(MenuDto.CreationTime))] + [MapperIgnoreTarget(nameof(MenuDto.CreatorId))] + [MapperIgnoreTarget(nameof(MenuDto.DeleterId))] + [MapperIgnoreTarget(nameof(MenuDto.DeletionTime))] + [MapperIgnoreTarget(nameof(MenuDto.IsDeleted))] + [MapperIgnoreTarget(nameof(MenuDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(MenuDto.LastModifierId))] + [MapperIgnoreTarget(nameof(MenuDto.MenuTextEn))] + [MapperIgnoreTarget(nameof(MenuDto.MenuTextTr))] public override partial MenuDto Map(Menu source); + [MapperIgnoreTarget(nameof(MenuDto.CreationTime))] + [MapperIgnoreTarget(nameof(MenuDto.CreatorId))] + [MapperIgnoreTarget(nameof(MenuDto.DeleterId))] + [MapperIgnoreTarget(nameof(MenuDto.DeletionTime))] + [MapperIgnoreTarget(nameof(MenuDto.IsDeleted))] + [MapperIgnoreTarget(nameof(MenuDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(MenuDto.LastModifierId))] + [MapperIgnoreTarget(nameof(MenuDto.MenuTextEn))] + [MapperIgnoreTarget(nameof(MenuDto.MenuTextTr))] public override partial void Map(Menu source, MenuDto destination); public override void BeforeMap(Menu source) diff --git a/api/src/Sozsoft.Platform.Application/Note/NoteAppService.cs b/api/src/Sozsoft.Platform.Application/Note/NoteAppService.cs index 9740289e..eedfd12d 100644 --- a/api/src/Sozsoft.Platform.Application/Note/NoteAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Note/NoteAppService.cs @@ -63,7 +63,7 @@ public class NoteAppService : CrudAppService< ); var fileDto = notes - .SelectMany(a => JsonSerializer.Deserialize>(a.FilesJson ?? "[]")) + .SelectMany(a => JsonSerializer.Deserialize>(a.FilesJson ?? "[]") ?? []) .FirstOrDefault(f => f.SavedFileName == savedFileName); using var ms = new MemoryStream(); diff --git a/api/src/Sozsoft.Platform.Application/Note/NoteMappers.cs b/api/src/Sozsoft.Platform.Application/Note/NoteMappers.cs index e327be7b..ccdd3926 100644 --- a/api/src/Sozsoft.Platform.Application/Note/NoteMappers.cs +++ b/api/src/Sozsoft.Platform.Application/Note/NoteMappers.cs @@ -7,9 +7,11 @@ namespace Sozsoft.Platform.Notes; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class NoteToNoteDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(NoteDto.CreateUserName))] [MapperIgnoreTarget(nameof(NoteDto.Files))] public override partial NoteDto Map(Note source); + [MapperIgnoreTarget(nameof(NoteDto.CreateUserName))] [MapperIgnoreTarget(nameof(NoteDto.Files))] public override partial void Map(Note source, NoteDto destination); diff --git a/api/src/Sozsoft.Platform.Application/Public/PublicMappers.cs b/api/src/Sozsoft.Platform.Application/Public/PublicMappers.cs index 29f50629..c6ed6aa5 100644 --- a/api/src/Sozsoft.Platform.Application/Public/PublicMappers.cs +++ b/api/src/Sozsoft.Platform.Application/Public/PublicMappers.cs @@ -8,8 +8,10 @@ namespace Sozsoft.Platform.Public; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class DemoToDemoDtoMapper : TwoWayMapperBase { + [MapperIgnoreTarget(nameof(DemoDto.TenantId))] public override partial DemoDto Map(Demo source); + [MapperIgnoreTarget(nameof(DemoDto.TenantId))] public override partial void Map(Demo source, DemoDto destination); public override void BeforeMap(Demo source) @@ -36,8 +38,10 @@ public partial class DemoToDemoDtoMapper : TwoWayMapperBase [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class BlogCategoryToBlogCategoryDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(BlogCategoryDto.TenantId))] public override partial BlogCategoryDto Map(BlogCategory source); + [MapperIgnoreTarget(nameof(BlogCategoryDto.TenantId))] public override partial void Map(BlogCategory source, BlogCategoryDto destination); public override void BeforeMap(BlogCategory source) @@ -52,10 +56,19 @@ public partial class BlogCategoryToBlogCategoryDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(BlogPostDto.IsLiked))] + [MapperIgnoreTarget(nameof(BlogPostDto.Tags))] + [MapperIgnoreTarget(nameof(BlogPostDto.TenantId))] public override partial BlogPostDto Map(BlogPost source); + [MapperIgnoreTarget(nameof(BlogPostDto.IsLiked))] + [MapperIgnoreTarget(nameof(BlogPostDto.Tags))] + [MapperIgnoreTarget(nameof(BlogPostDto.TenantId))] public override partial void Map(BlogPost source, BlogPostDto destination); + [MapperIgnoreTarget(nameof(BlogCategoryDto.TenantId))] + private partial BlogCategoryDto MapCategory(BlogCategory source); + public override void BeforeMap(BlogPost source) { } @@ -68,10 +81,17 @@ public partial class BlogPostToBlogPostDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(BlogPostListDto.Tags))] + [MapperIgnoreTarget(nameof(BlogPostListDto.TenantId))] public override partial BlogPostListDto Map(BlogPost source); + [MapperIgnoreTarget(nameof(BlogPostListDto.Tags))] + [MapperIgnoreTarget(nameof(BlogPostListDto.TenantId))] public override partial void Map(BlogPost source, BlogPostListDto destination); + [MapperIgnoreTarget(nameof(BlogCategoryDto.TenantId))] + private partial BlogCategoryDto MapCategory(BlogCategory source); + public override void BeforeMap(BlogPost source) { } @@ -84,8 +104,10 @@ public partial class BlogPostToBlogPostListDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(ProductDto.TenantId))] public override partial ProductDto Map(Product source); + [MapperIgnoreTarget(nameof(ProductDto.TenantId))] public override partial void Map(Product source, ProductDto destination); public override void BeforeMap(Product source) @@ -96,8 +118,18 @@ public partial class ProductToProductDtoMapper : TwoWayMapperBase { + [MapperIgnoreTarget(nameof(PaymentMethodDto.TenantId))] public override partial PaymentMethodDto Map(PaymentMethod source); + [MapperIgnoreTarget(nameof(PaymentMethodDto.TenantId))] public override partial void Map(PaymentMethod source, PaymentMethodDto destination); public override void BeforeMap(PaymentMethod source) @@ -144,10 +178,17 @@ public partial class InstallmentOptionToInstallmentOptionDtoMapper : MapperBase< [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class OrderToOrderDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(OrderDto.PaymentData))] + [MapperIgnoreTarget(nameof(OrderDto.Tenant))] public override partial OrderDto Map(Order source); + [MapperIgnoreTarget(nameof(OrderDto.PaymentData))] + [MapperIgnoreTarget(nameof(OrderDto.Tenant))] public override partial void Map(Order source, OrderDto destination); + [MapperIgnoreTarget(nameof(OrderItemDto.Product))] + private partial OrderItemDto? MapItem(OrderItem? source); + public override void BeforeMap(Order source) { } diff --git a/api/src/Sozsoft.Platform.Application/Tenants/PlatformTenantAppService.cs b/api/src/Sozsoft.Platform.Application/Tenants/PlatformTenantAppService.cs index 4b61d267..e2b8fcfa 100644 --- a/api/src/Sozsoft.Platform.Application/Tenants/PlatformTenantAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Tenants/PlatformTenantAppService.cs @@ -61,7 +61,7 @@ public class PlatformTenantAppService : TenantAppService, IPlatformTenantAppServ //TODO: Update ve Delete ConnectionString: Validation vt varsa değiştireceği zaman uyarı verilmeli [AllowAnonymous] - public async Task GetByNameDetailAsync(string name) + public async Task GetByNameDetailAsync(string name) { var tenant = await TenantRepository.FindByNameAsync(name); @@ -97,7 +97,7 @@ public class PlatformTenantAppService : TenantAppService, IPlatformTenantAppServ [Authorize(TenantManagementPermissions.Tenants.Update)] public async Task PostSeedTenantDataAsync(CreateUpdateTenantInput input) { - var tenant = await tenantRepository.FindAsync(input.Id.Value) ?? throw new EntityNotFoundException(); + var tenant = (input.Id.HasValue ? await tenantRepository.FindAsync(input.Id.Value) : null) ?? throw new EntityNotFoundException(); await distributedEventBus.PublishAsync( new ApplyDatabaseMigrationsEto { diff --git a/api/src/Sozsoft.Platform.Application/Videoroom/VideoroomMappers.cs b/api/src/Sozsoft.Platform.Application/Videoroom/VideoroomMappers.cs index a4ac7dac..d5fd8db5 100644 --- a/api/src/Sozsoft.Platform.Application/Videoroom/VideoroomMappers.cs +++ b/api/src/Sozsoft.Platform.Application/Videoroom/VideoroomMappers.cs @@ -7,8 +7,10 @@ namespace Sozsoft.Platform.VideoRooms; [Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class VideoroomToVideoroomDtoMapper : MapperBase { + [MapperIgnoreTarget(nameof(VideoroomDto.SettingsDto))] public override partial VideoroomDto Map(Videoroom source); + [MapperIgnoreTarget(nameof(VideoroomDto.SettingsDto))] public override partial void Map(Videoroom source, VideoroomDto destination); public override void BeforeMap(Videoroom source)