Comments (12)
@oguzhanagir can you look at this ?
from aspnetboilerplate.
I want to know where do I put this code in my project. it may be wrong.
Configuration.Modules.AbpAutoMapper().Configurators.Add(configuration => { ProductDtoMapper.CreateMappings(configuration, new MultiLingualMapContext( IocManager.Resolve<ISettingManager>() )); });
now like that;
public class lansmanApplicationModule : AbpModule
{
public override void PreInitialize()
{
Configuration.Authorization.Providers.Add();
//Configuration.BackgroundJobs.IsJobExecutionEnabled = false;
Configuration.Notifications.Notifiers.Add<EmailRealTimeNotifier>();
Configuration.Notifications.Notifiers.Add<SmsRealTimeNotifier>();
}
public override void Initialize()
{
var thisAssembly = typeof(lansmanApplicationModule).GetAssembly();
IocManager.RegisterAssemblyByConvention(thisAssembly);
Configuration.Modules.AbpAutoMapper().Configurators.Add(
// Scan the assembly for classes which inherit from AutoMapper.Profile
cfg => cfg.AddMaps(thisAssembly)
);
Configuration.Modules.AbpAutoMapper().Configurators.Add(configuration =>
{
ProductDtoMapper.CreateMappings(configuration, new MultiLingualMapContext(
IocManager.Resolve<ISettingManager>()
));
});
}
}
in Application layer. Is this correct?
from aspnetboilerplate.
yes it is :))
from aspnetboilerplate.
Hii @oguzhanagir , were you able to look at this?
from aspnetboilerplate.
Hi @aknaldemir,
Here, the reason for Title and Description being null may stem from the inconsistency in the data in the relevant table of your database. When we tested the information you provided, we did not encounter such an issue.
from aspnetboilerplate.
here is my db side;
from aspnetboilerplate.
@aknaldemir you should remove Title and Description fields from the main entity. Localized fields must be in Translation entity only.
from aspnetboilerplate.
I removed but still same.
from aspnetboilerplate.
Could you provide a sample project ?
from aspnetboilerplate.
can we check step by step
from aspnetboilerplate.
Maybe ProductMapProfile is override above configuraiton?
public class ProductMapProfile : Profile
{
public ProductMapProfile()
{
CreateMap<CreateProductDto, Product>()
.ForMember(dest => dest.ProductImages, opt => opt.MapFrom(src => src.ProductImages))
.ReverseMap();
CreateMap<CreateProductImageDto, ProductImage>()
.ReverseMap();
//CreateMap<Product, GetAllProductWithImagesAndCommentDto>();
CreateMap<Product, GetAllProductWithImageDto>();
CreateMap<Product, GetProductDto>();
//CreateMap<Product, GetProductByIdWithImagesAndCommentsDto>();
CreateMap<Product, ListProductForAdminDto>();
//CreateMap<ProductTranslation, ProductTranslationDto>()
// .ReverseMap();
}
}
internal static class ProductDtoMapper
{
public static void CreateMappings(IMapperConfigurationExpression configuration, MultiLingualMapContext context)
{
configuration.CreateMultiLingualMap<Product, ProductTranslation, GetAllProductWithImagesAndCommentDto>(context);
}
}
from aspnetboilerplate.
thanx for your time
from aspnetboilerplate.
Related Issues (20)
- GetAllIncludingAsync is missing from the IRepository interface.
- Low efficiency of soft deletion HOT 3
- UnitOfWork and Async calls - Abp Version 7.0.0 HOT 10
- Clock.Provider not working in abp v9 HOT 7
- GetAll Readonly method to IRepository HOT 1
- There is no async implementation of the AbpHangfireAuthorizationFilter.
- Retrieval of permissions is only possible synchronously. HOT 1
- When changing the language to Arabic, the layout didn't change to RTL and is still as en lang. HOT 3
- Add missed GetDbContextAsync Extension
- Update NuGet packages to latest version
- Use GetAllAsync for asynchronous methods HOT 1
- Upgrade templates to 9.2
- [Vulnerability]Ignoring tenant filters can result in cross-tenant unauthorized authorization attacks HOT 1
- OrganizationUnit does not generate audit correctly HOT 1
- Error in login and register page HOT 3
- PermissionManager - GetAllPermissionsAsync: where conditions bug
- Interceptors not firing HOT 2
- MultiDbContext does not work with the Migrator project
- ABP v9.2.2 backend job caused the database connection to remain unreleased HOT 2
- Abp.AspNetCore 8.4.0 .Net 7 Detect vulnerabilities when scanning using Snyk HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnetboilerplate.