-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2291 review ef core layer and extract internal db models for rdms #2292
Draft
pournasserian
wants to merge
5
commits into
dev
Choose a base branch
from
2291-review-ef-core-layer-and-extract-internal-db-models-for-rdms
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
2291 review ef core layer and extract internal db models for rdms #2292
pournasserian
wants to merge
5
commits into
dev
from
2291-review-ef-core-layer-and-extract-internal-db-models-for-rdms
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduce FluentCMS.Repositories.EFCore.DbModels namespace with new classes and interfaces. Added entities include ApiToken, AuditableEntity, Block, Content, ContentType, ContentTypeField, Entity, File, Folder, GlobalSettings, FileUploadConfig, Layout, Page, Permission, Plugin, PluginContent, PluginDefinition, PluginDefinitionType, Policy, Role, RoleTypes, Settings, Site, and SiteAssociatedEntity. These additions provide a foundation for managing content, permissions, and settings within the CMS.
Refactored various classes to use ICollection instead of List or Dictionary for properties, enhancing flexibility and consistency. Added navigation properties and foreign keys to improve data relationships. Introduced new classes to represent specific data structures and settings.
Removed obsolete classes and interfaces including ApiToken, AuditableEntity, Block, Content, and others. Updated FluentCmsDbContext to use new DbSet properties for corresponding models. Modified MappingProfile to introduce new mappings for the new models and removed old mappings. Added new using directives and global usings. Introduced new model classes with appropriate attributes, properties, and relationships. Implemented standard interfaces for entity properties.
Updated ApiTokenModel, ApiTokenPolicyModel, and GlobalSettingsModel to inherit from AuditableEntityModel and EntityModel. Modified EFCoreServiceExtensions to comment out IUserRepository and IUserRoleRepository services. Refactored ApiTokenRepository, AuditableEntityRepository, and other repository classes to use IMapper for entity mapping. Introduced new interfaces IAuditableEntityRepository, IEntityRepository, and ISiteAssociatedRepository. Commented out UserRepository and UserRoleRepository classes. Updated _GlobalUsings.cs to include global usings for FluentCMS.Repositories.EFCore.DbModels and AutoMapper.
Reintroduced previously commented-out code in FluentCmsDbContext.cs, including configurations for ApiTokenModel, ApiTokenPolicyModel, SettingsModel, and new SettingValuesModel with relationships and cascade delete behaviors. Removed AutoMapper import in MappingProfile.cs and updated mappings for AuditableEntityModel to ignore CreatedBy and CreatedAt fields. Modified return statements in EntityRepository.cs methods to map database entities back to domain entities before returning. Refactored GlobalSettingsRepository.cs to use AutoMapper for mapping between GlobalSettings and GlobalSettingsModel, and updated the Update method to handle both creation and updating of settings. Refactored SettingsRepository.cs to use SettingsModel and SettingValuesModel, removing AutoMapper import and ensuring proper mapping and saving of changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.